I have an array in the form:
var a1 = [
['AA', 1],
['AA', 2],
['AA', 3],
['BB', 7],
['BB', 8],
['BB', 9]
];
I want to transform it into:
output = [
['AA':1,2,3],
['BB':7,8,9]
]
I need to transform it this way so I can put my JSON formatted data that comes from SQL into a highcharts graph that seems to need the array series as follows https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/demo/streamgraph/