I have structured JSON data as below:
[
{
"Month": "Jan"
"Year": 2015,
"Count": 15
},
{
"Month": "Feb"
"Year": 2015,
"Count": 5
},
{
"Month": "Jan"
"Year": 2016,
"Count": 25
},
{
"Month": "Feb"
"Year": 2016,
"Count": 50
}
]
I want to group the data using JavaScript to get the below output. Can someone help me with this?
[
{
"Month": "Jan"
"Count_2015": 15,
"Count_2016": 25
},
{
"Month": "Feb"
"Count_2015": 5,
"Count_2016": 50
}
]