I am having a problem to figure out in ReactJs how to access the elements from a dict in array and to build another dict. The data is like this:
[ {name: "dad", data: 10}, {name: "mom", data: 20}, {name: "dad", data: 40},
{name: "mom", data:50}, {name: "dad", data: 01}]
I want the data to be like this:
[{name: "dad", data: [10,40,01]}, {name: "mom", data: [50,20]}]