is there a way to "merge" an array of objects' values?
For example, I would like to take an array like this . . .
input = [{name: 'x', data: 2},{name: 'y', data: 5},{name: 'x', data: 4},{name: 'y', data: 3}];
. . . and transform it into this
output = [{name: 'x', data: [2,4]},{name: 'y', data: [5,3]}]