My issue lies with transforming a JSON structure like the one below:
[{
"groupid": 29,
"percentage": 14
}, {
"groupid": 29,
"percentage": 22
}, {
"groupid": 59,
"percentage": 66,
}]
I am looking to convert it into the format shown below using JavaScript.
{
"29": [14, 22],
"59": [66]
}