This question already has an answer here:
I have an array with objects, each object, a div, has an id
.
Can I retrieve the array index number of a given object based on its id
using this?
var index = ar.map(function(el) {
return el. ??
}).indexOf('objectID4');