I have the code like this one below, woluld like to convert to another format
result : [
{ _id: 'Completed', count: 1 },
{ _id: 'Assigned', count: 9 },
{ _id: 'Closed', count: 2 },
{ _id: 'In-Progress', count: 5 }
]
I want the format as below
result : [
{ Completed :1 },
{ Assigned, : 9 },
{ Closed,: 2 },
{ In-Progress : 5 }
]
Thanks