Suppose I have an array of objects:
var a = [
{id: "1", "name": "ABC"},
{id: "2", "name": "XYZ"},
{id: "3", "name": "PQR"},
{id: "4", "name": "JKL"}
];
I need to find the index of object which has the key "id: '3' " in it. Is there any way to find the index of the object using underscore library? I have achieved this using for loop, but want to know an easier approach.