About Cacher
Web App
Download
Sign In
Sign Up
menu
Cacher is the code snippet organizer for pro developers
We empower you and your team to get more done, faster
Learn More
cachaito
4/30/2015 - 11:21 PM
share
Share
add_circle_outline
Save
Compare with JSON.stringify()
Works when you have simple JSON-style objects without methods and DOM nodes inside
The ORDER of the properties IS IMPORTANT, so this method will return false for following objects: x = {a: 1, b: 2}; y = {b: 2, a: 1};
objects comparsions.js
content_copy
file_download
JSON.stringify(obj1) === JSON.stringify(obj2);
clear