function isObjectEqual(object1, object2) {
  return JSON.stringify(object1) === JSON.stringify(object2);
}
Checks if two objects or arrays are (deep) equal

@param {Object|Array} object1
@param {Object|Array} object2
@returns {Boolean}