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
Since there is no index of your data structure by _id, something is going to have to loop over the structure and find an _id value that matches.
_id
function findId(data, id) { for (var i = 0; i < data.length; i++) { if (data[i]._id == id) { return(data[i]); } } }