array firt code example
Example 1: find a single element in array of objects javascript
myArray.find(x => x.id === '45').foo;
Example 2: javascript get first element of array
alert($(ary).first());
myArray.find(x => x.id === '45').foo;
alert($(ary).first());