pick a from object of an array with javascript code example
Example 1: search an array of objects with specific object property value
var result = jsObjects.find(obj => {
return obj.b === 6
})
Example 2: js random string from array
const randomElement = array[Math.floor(Math.random() * array.length)];