What\'s the best method to get the index of an array which contains objects?
Imagine this scenario:
var hello = { hello: \'world\', foo: \'ba
You can create your own prototype to do this:
something like:
Array.prototype.indexOfObject = function (object) { for (var i = 0; i < this.length; i++) { if (JSON.stringify(this[i]) === JSON.stringify(object)) return i; } }