I have a JavaScript array of objects like this:
var myArray = [{...}, {...}, {...}];
Each object has unique id among other pro
id
Why not simply make a loop ?
function indexOfId(array, id) { for (var i=0; i
The fact that there are many facilities in js (or js libraries) doesn't mean you must not, sometimes, write a loop. That's fast and simple.