{"ScriptPreparationCode":"function makeid() {\r\n var text = \u0022\u0022;\r\n var possible = \u0022ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\u0022;\r\n\r\n for (var i = 0; i \u003C 5; i\u002B\u002B)\r\n text \u002B= possible.charAt(Math.floor(Math.random() * possible.length));\r\n\r\n return text;\r\n}\r\n\r\nwindow.parentObj = {};\r\n\r\nfor (let i = 0; i \u003C 100; i\u002B\u002B) {\r\n\twindow.parentObj[makeid()] = makeid();\r\n}\r\n\r\n","TestCases":[{"Name":"Object.entries","Code":"const newObj = {};\r\nObject.entries(window.parentObj).forEach(([k, v], i) =\u003E {\r\n if ((i % 2) === 0) {\r\n\tnewObj[k] = v; \r\n }\r\n});","IsDeferred":false},{"Name":"Object.keys","Code":"const newObj = {};\r\nObject.keys(window.parentObj).forEach((k, i) =\u003E {\r\n if ((i % 2) === 0) {\r\n\tnewObj[k] = window.parentObj[k]; \r\n }\r\n});","IsDeferred":false},{"Name":"Object.keys with extra array","Code":"const newObj = {};\r\nObject.keys(window.parentObj).forEach((k, i) =\u003E {\r\n const [extraK, v] = [k, window.parentObj[k]]\r\n if ((i % 2) === 0) {\r\n\tnewObj[extraK] = v; \r\n }\r\n});","IsDeferred":false},{"Name":"Object.entries without array","Code":"const newObj = {};\r\nObject.entries(window.parentObj).forEach((keyAndVal, i) =\u003E {\r\n if ((i % 2) === 0) {\r\n\tnewObj[keyAndVal[0]] = keyAndVal[1]; \r\n }\r\n});","IsDeferred":false},{"Name":"Object for..in","Code":"const newObj = {};\r\nfor(var key in window.parentObj) {\r\n if ((i % 2) === 0) {\r\n\tnewObj[key] = window.parentObj[key]\r\n }\r\n};\r\n","IsDeferred":false}]}