{"ScriptPreparationCode":"var parsedObject = {};\r\nvar test = Array.from({length: 50}).map(x =\u003E ({ \r\n seconds: 300, \r\n icon: \u0027icon\u0027, \r\n mcpId: ~~(Math.random()*1000),\r\n playItem: true,\r\n}));","TestCases":[{"Name":"object assing","Code":"parsedObject = Object.assign({}, ...test.map(item =\u003E ({ [item.mcpId]: item })))\r\nconsole.log(parsedObject)","IsDeferred":false},{"Name":"for loop","Code":" for (let i = 0, len = test.length; i \u003C len; i \u002B= 1) {\r\n const item = test[i];\r\n const mcpId = item.mcpId;\r\n parsedObject[mcpId] = item;\r\n }\r\nconsole.log(parsedObject)","IsDeferred":false},{"Name":"reduce","Code":"var parsedObject = test.reduce(function(o, val) { o[val.mcpId] = val; return o; }, {});\r\nconsole.log(parsedObject)","IsDeferred":false}]}