I have a JavaScript array of objects like this:
var myArray = [{...}, {...}, {...}];
Each object has unique id among other pro
id
ES6 Array.findIndex
const myArray = [{id:1}, {id:2}, {id3}]; const foundIndex = myArray.findIndex((el) => (el.id === 3));