How can I determine equality for two JavaScript objects?
Why reinvent the wheel? Give Lodash a try. It has a number of must-have functions such as isEqual(). _.isEqual(object, other); It will brute force check each key value – just like the other examples on this page – using ECMAScript 5 and native optimizations if they’re available in the browser. Note: Previously this answer recommended Underscore.js, … Read more