I have a data object
data : [
["1", 20],
["1", 24],
["1", 2],
["1", 32],
["1", 23],
["1", 80],
["2", 3],
["2", 32],
["2", 34],
["2", 36],
["2", 36]]
Now I want the object to be grouped like this ie "1" grouped in one array and same for the "2"
"data" : [
["1", [20, 24, 2, 32, 23, 80]],
["2", [3, 32, 34, 36, 36]]
]