Code below will return me the first index of the object with id = "1" which is 0. How to find the last index of the object with id = "1" which is 2 ? Of course I could use a loop but without using a loop is it possible?
var array = [{id: "1"}, {id: "2"}, {id: "1"}];
var index = array.findIndex(function(oItem) {
return oItem.id === "1";
});