{"ScriptPreparationCode":"var objects = Array.from(new Array(1000)).map((r, i) =\u003E ({\r\n id: \u0060id-${i}\u0060,\r\n val: i\r\n}));\r\n// Output should be\r\n// { \u0022id-0\u0022: 0, \u0022id-1\u0022: 1, ... }","TestCases":[{"Name":"Populate object via ForEach","Code":"var newMapFE = {};\r\nobjects.forEach(o =\u003E { newMapFE[o.id] = o.val })","IsDeferred":false},{"Name":"Populate object via Reduce","Code":"objects.reduce((acc, item) =\u003E ({...acc, [item.id]: item.val}), {});","IsDeferred":false}]}