I have an array of elements in Javascript
var axes = [{id: "a"}, {id: "b"}]
and I have one of these items in a variable
var axis = {id: "b"}
I wanted a one liner in JavaScript (similar to the Linq one liners I can do in C#) where I will get the index of the array in which this element exists. So, in this example I will get the answer 1.
How is this possible?