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 works without custom code
var arr, a, found; arr = [{x: 1, y: 2}]; a = {x: 1, y: 2}; found = JSON.stringify(arr).indexOf(JSON.stringify(a)) > - 1; // found === true
Note: this does not give the actual index, it only tells if your object exists in the current data structure