I have a array json objects, and want convert the rows to columns and the column at side as value of column. It's like the function crosstab of postgresql
the json it's like this:
{"marketcode":"01","size":"8,5","amount":1},
{"marketcode":"01","size":"9","amount":1},
{"marketcode":"01","size":"10","amount":0},
I want it's like this:
{"marketcode": "01", "8,5": 1, "9": 1, "10": 0}
I searched for something lodash, but i did not find anything