{"ScriptPreparationCode":"var max2 = 100000;\r\n\r\nvar data = [];\r\nfor (var i = 0; i \u003C= max2; i\u002B\u002B) { data.push({ id: i }); }","TestCases":[{"Name":"Object.groupBy","Code":"Object.groupBy(data, ({ id }) =\u003E id)","IsDeferred":false},{"Name":"Array.reduce","Code":"data.reduce((acc, item) =\u003E {\r\n acc[item.id] = item;\r\n return acc;\r\n}, {})","IsDeferred":false},{"Name":"Lodash groupBy","Code":"_.groupBy(data, ({id}) =\u003E id)","IsDeferred":false},{"Name":"custom groupBy","Code":"// custom groupBy\r\n\r\nconst groupBy = (data, property) =\u003E data.reduce((acc, item) =\u003E {acc[property] = item; return acc; }, {})\r\n\r\ngroupBy(data, \u0027id\u0027) ","IsDeferred":false}]}