What\'s the best method to get the index of an array which contains objects?
Imagine this scenario:
var hello = { hello: \'world\', foo: \'ba
array.filter(function(item, indx, arr){ return(item.hello === 'stevie'); })[0];
Mind the [0].
[0]
It is proper to use reduce as in Antonio Laguna's answer.
reduce
Antonio Laguna
Apologies for the brevity...