here are some objects which i fetch from query results
{
{
"name": "John",
"notification": "sms"
},
{
"name": "John",
"notification": "email"
},
}
From those results, i want to build an array like this
{
"name":"John",
"notification":['email', 'sms']
}
Anyone who can light up my day?