{"ScriptPreparationCode":"var items = [];\r\n\r\nfor (var i = 0; i \u003C 1000; i\u002B\u002B) {\r\n items.push({\r\n id: i,\r\n });\r\n}","TestCases":[{"Name":"manual","Code":"\r\nconst stats = _.reduce(\r\n \titems,\r\n (stats, item) =\u003E {\r\n stats[item.id] = { goals: [], nb_goals_as_owner: 0, nb_goals_as_contributor: 0, ...item};\r\n return stats;\r\n }, {\r\n }\r\n )\r\n","IsDeferred":false},{"Name":"lodash set","Code":"\r\n let stats = _.reduce(\r\n items,\r\n (empById, item) =\u003E\r\n _.set(\r\n empById,\r\n item.id,\r\n _.assign(item, { goals: [], nb_goals_as_owner: 0, nb_goals_as_contributor: 0 })\r\n ),\r\n {}\r\n );","IsDeferred":false}]}