I need to get the index of the json object in an array whose by the objects id
here is the example code
var list = [ { _id: \'4dd822c5e8a6c42aa7000
Just loop through the list until you find the matching id.
function indexOf(list, id) { for (var i = 0; i < list.length; i++) { if (list[i]._id === id) { return i; } } return -1; }