{"ScriptPreparationCode":"var userInfo = [\r\n \t{\r\n id: 1,\r\n name: \u0027kim\u0027,\r\n age: 22,\r\n },\r\n {\r\n id: 2,\r\n name: \u0027park\u0027,\r\n age: 25,\r\n },\r\n {\r\n id: 3,\r\n name: \u0027lee\u0027,\r\n age: 25,\r\n },\r\n {\r\n id: 4,\r\n name: \u0027choi\u0027,\r\n age: 21,\r\n },\r\n];","TestCases":[{"Name":"ES6","Code":"const groupedUsingReduce = \r\n\t userInfo.reduce((acc, cur) =\u003E {\r\n\t\tacc[cur.age] = acc[cur.age] || [];\r\n\t\tacc[cur.age].push(cur)\r\n\t\treturn acc\r\n\t}, {})\r\n\r\nconst filtered = Object.fromEntries(\r\n\tObject.entries(groupedUsingReduce).filter(([key, value]) =\u003E\r\n\t\t(parseInt(key) \u003C 25)\r\n\t)\r\n)","IsDeferred":false},{"Name":"lodash","Code":"const filtered = _.chain(userInfo)\r\n\t\t.groupBy(\u0027age\u0027)\r\n\t\t.pickBy((value, key) =\u003E parseInt(key) \u003C 25)\r\n\t\t.value();","IsDeferred":false}]}