{"ScriptPreparationCode":"function rand() {\r\n return Math.floor(Math.random() * 10000)\r\n}\r\nvar data = Array(1000).fill(0).map((_, i) =\u003E ({ i, a: rand(), b: rand() }))","TestCases":[{"Name":"Object.fromEntries","Code":"Object.fromEntries(data.map(({i, ...rest}) =\u003E [i, rest]));","IsDeferred":false},{"Name":"Reduce (reuse object)","Code":"data.reduce((acc, {i, ...rest}) =\u003E {\r\n acc[i] = rest;\r\n return acc;\r\n}, {});","IsDeferred":false},{"Name":"Reduce (creating temporary objects)","Code":"Object.entries(data).reduce((acc, {i, ...rest}) =\u003E ({\r\n ...acc,\r\n [i]: rest\r\n}), {});","IsDeferred":false},{"Name":"For-of","Code":"const result = {}\r\nfor (const {i, ...rest} of data) {\r\n result[i] = rest;\r\n}","IsDeferred":false}]}