js get object by id from array

JavaScript
myArray.find(x => x.id === '45');

Source

Also in JavaScript: