Object comparison in JavaScript
http://stackoverflow.com/questions/1068834/object-comparison-in-javascript
Why not JSON.stringify it then compare?
JSON.stringifyremoves properties that are set toundefined.- What if the data is the same but the order of the keys is different?
- String performance.