{"ScriptPreparationCode":"const __isArray = Array.isArray.bind(Array);\r\nconst __keys = Object.keys.bind(Object);\r\n\r\nfunction isJSONEqual(o1, o2) {\r\n if (o1 === o2) return true;\r\n const o1Type = typeof o1;\r\n if (o1Type !== typeof o2) return false;\r\n if (o1Type !== \u0027object\u0027) return false;\r\n\r\n const isArrayO1 = __isArray(o1);\r\n if (isArrayO1 !== Array.isArray(o2)) return false;\r\n if (isArrayO1) {\r\n let i = o1.length;\r\n if (i !== o2.length) return false;\r\n\r\n while (i-- \u003E 0) {\r\n if (!isJSONEqual(o1[i], o2[i])) return false;\r\n }\r\n } else {\r\n const keys = new Set();\r\n const keysAdd = keys.add.bind(keys);\r\n\r\n __keys(o1).forEach(keysAdd);\r\n __keys(o2).forEach(keysAdd);\r\n\r\n for (const key of keys) {\r\n if (!isJSONEqual(o1[key], o2[key])) return false;\r\n }\r\n }\r\n\r\n return true;\r\n}\r\n\r\n\r\n// 1 level deep\r\nwindow.foo1 = { a: 1, b: 2, c: { a: 1, b: 2, c: { a: 1, b: 2 } } };\r\nwindow.bar1 = { a: 1, b: 3, c: { a: 1, b: 2, c: { a: 1, b: 2 } } };\r\n\r\n// 2 levels deep\r\nwindow.foo2 = { a: 1, b: 2, c: { a: 1, b: 2, c: { a: 1, b: 2 } } };\r\nwindow.bar2 = { a: 1, b: 2, c: { a: 1, b: 3, c: { a: 1, b: 2 } } };\r\n\r\n// 3 levels deep\r\nwindow.foo3 = { a: 1, b: 2, c: { a: 1, b: 2, c: { a: 1, b: 2 } } };\r\nwindow.bar3 = { a: 1, b: 2, c: { a: 1, b: 2, c: { a: 1, b: 4 } } };","TestCases":[{"Name":"_.isEqual Level 1","Code":"_.isEqual(window.foo1, window.bar1)","IsDeferred":false},{"Name":"JSON.stringify Level 1","Code":"JSON.stringify(window.foo1) === JSON.stringify(window.bar1);","IsDeferred":false},{"Name":"_.isEqual Level 2","Code":"_.isEqual(window.foo2, window.bar2)","IsDeferred":false},{"Name":"JSON.stringify Level 2","Code":"JSON.stringify(window.foo2) === JSON.stringify(window.bar2);","IsDeferred":false},{"Name":"_.isEqual Level 3","Code":"_.isEqual(window.foo3, window.bar3)","IsDeferred":false},{"Name":"JSON.stringify Level 3","Code":"JSON.stringify(window.foo3) === JSON.stringify(window.bar3);","IsDeferred":false},{"Name":"isJSONEqual Level 1","Code":"isJSONEqual(window.foo1, window.bar1)","IsDeferred":false},{"Name":"isJSONEqual Level 2","Code":"isJSONEqual(window.foo2, window.bar2)","IsDeferred":false},{"Name":"isJSONEqual Level 3","Code":"isJSONEqual(window.foo3, window.bar3)","IsDeferred":false}]}