Object comparison in JavaScript [duplicate]

Unfortunately there is no perfect way, unless you use _proto_ recursively and access all non-enumerable properties, but this works in Firefox only. So the best I can do is to guess usage scenarios. 1) Fast and limited. Works when you have simple JSON-style objects without methods and DOM nodes inside: JSON.stringify(obj1) === JSON.stringify(obj2) The ORDER … Read more