{"ScriptPreparationCode":"var oldData = { item1: \u0027olditem1\u0027, item2: \u0027olditem2\u0027, item3: \u0027unchanged\u0027 };\r\nvar newData = { item1: \u0027newitem1\u0027, item3: \u0027unchanged\u0027, item4: \u0027something else\u0027 };","TestCases":[{"Name":"array push","Code":"const result = [];\r\nObject.entries(oldData).forEach(([key, oldValue]) =\u003E {\r\n const newValue = newData[key];\r\n if (typeof newValue === \u0027undefined\u0027 || oldValue !== newValue) {\r\n result.push(key);\r\n }\r\n});","IsDeferred":false},{"Name":"optimized push","Code":"const result = [];\r\nObject.keys(oldData).forEach((key) =\u003E {\r\n if (oldData[key] !== newData[key]) {\r\n result.push(key);\r\n }\r\n});","IsDeferred":false},{"Name":"reduce","Code":"const result = Object.entries(oldData).reduce((accum, [key, oldValue]) =\u003E {\r\n const newValue = newData[key];\r\n if (typeof newValue === \u0027undefined\u0027 || oldValue !== newValue) {\r\n return [...accum, key];\r\n }\r\n\r\n return accum;\r\n}, []);","IsDeferred":false},{"Name":"optimized reduce","Code":"const result = Object.keys(oldData).reduce((accum, key) =\u003E {\r\n if (oldData[key] !== newData[key]) {\r\n accum.push(key);\r\n }\r\n\r\n return accum;\r\n}, []);","IsDeferred":false}]}