{"ScriptPreparationCode":"var max2 = 500000;\r\n\r\nvar data = [];\r\nfor (var i = 0; i \u003C= max2; i\u002B\u002B) { data.push({ id: i }); }","TestCases":[{"Name":"Lodash","Code":"_.groupBy(data, ({ id }) =\u003E id)","IsDeferred":false},{"Name":"Native","Code":"// Using reduce to mimic _.groupBy\r\nconst grouped = data.reduce((acc, item) =\u003E {\r\n // Initialize an array for this id if it doesn\u0027t exist\r\n if (!acc[item.id]) acc[item.id] = [];\r\n // Push the item into the array for this id\r\n acc[item.id].push(item);\r\n return acc;\r\n}, {});\r\n","IsDeferred":false}]}