{"ScriptPreparationCode":"var inventory = [{\r\n name: \u0022asparagus\u0022,\r\n type: \u0022vegetables\u0022,\r\n quantity: 5\r\n },\r\n {\r\n name: \u0022bananas\u0022,\r\n type: \u0022fruit\u0022,\r\n quantity: 0\r\n },\r\n {\r\n name: \u0022goat\u0022,\r\n type: \u0022meat\u0022,\r\n quantity: 23\r\n },\r\n {\r\n name: \u0022cherries\u0022,\r\n type: \u0022fruit\u0022,\r\n quantity: 5\r\n },\r\n {\r\n name: \u0022fish\u0022,\r\n type: \u0022meat\u0022,\r\n quantity: 22\r\n },\r\n];","TestCases":[{"Name":"Pure JS","Code":"const result = Object.groupBy(inventory, ({ type }) =\u003E type);","IsDeferred":false},{"Name":"Lodash prop","Code":"_.groupBy(inventory, \u0027type\u0027);","IsDeferred":false},{"Name":"Lodash func","Code":"_.groupBy(inventory, ({ type }) =\u003E type);","IsDeferred":false}]}