function indexOfObject(arr, obj) {
    for (var i in arr) {
      if (!arr.hasOwnProperty(i)) continue;
      for (var key in obj) {
        if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);
      }
    }
    return -1;
  }
Returns the index of the object within the given array
@param  {Array} arr   Array that may or may not hold the object
@param  {Object} obj  An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find
@return {Number}      The index of the object in the array, or -1