What\'s the best method to get the index of an array which contains objects?
Imagine this scenario:
var hello = { hello: \'world\', foo: \'ba
This is the way to find the object's index in array
var myArray = [{ hello: 'world', foo: 'bar' },{ hello: 'stevie', foo: 'baz' }]; for (i = 0; i < myArray.length; i++) { if (myArray[i].hello === 'stevie') { alert('position: ' + i); return; } }