I'm looking for an output similar to this one below where i want to groupBy costomer and orderid.
Input:
[ { "item": 621, "orderid": "ON22", "qty": 45.0, "customer": "610", "date": "1988-08-13" }, { "item": 63, "orderid": "ON2234", "qty": 7, "customer": "813", "date": "2001-08-13" } ]
Desired output: [ { "customer":"813", "data":[ { "item":63, "qty":7, "orderid":"ON2234", "date":"2001-08-13" } ] }, { "customer":"610", "data":[ { "item": 621, "qty": 45.0, "orderid": "ON22", "date": "1988-08-13" } ] } ]