array find object by id code example
Example 1: js get object by id from array
myArray.find(x => x.id === '45');
Example 2: javascript get object from array where property equals
var res = jsArray.find(obj => { return obj.b === 6 })
Example 3: javascript get array object by id
myArray.find(x => x.id === '45').foo;