{"ScriptPreparationCode":"var max2 = 100000;\r\n\r\nconst toKey = (item) =\u003E item.date.toLocaleDateString()\r\n\r\nfunction zeroOutTime(date) {\r\n const newDate = new Date(date.getTime());\r\n newDate.setHours(0, 0, 0, 0);\r\n return newDate;\r\n}\r\n\r\nvar data = [];\r\nfor (var i = 0; i \u003C= max2; i\u002B\u002B) { \r\n const key = zeroOutTime(new Date(Date.now() \u002B Math.floor(Math.random()*1000*60*60*24*30))).valueOf()\r\n data.push({ id: i, key: key }); \r\n }","TestCases":[{"Name":"Lodash","Code":"const toKey = (item) =\u003E item.key;\r\n_.groupBy(data, toKey)","IsDeferred":false},{"Name":"Native","Code":"const toKey = (item) =\u003E item.key;\r\ndata.reduce((acc, item) =\u003E {\r\n acc[toKey(item)] = item;\r\n return acc;\r\n}, {})","IsDeferred":false}]}