How do I determine what the index of an object is within an array?
Take the following setup:
var item = [
{
identifier: "id1",
},
{
identifier: "id2",
},
{
identifier: "id3",
}
];
I know what the object value is and that it exists and currrently have it stored like this currentValue = "id2";
What i'd like to know is that "id2" equals to (in this case) index 1.