I was trying to do,but i was unable to sort it...I want to sort the data and year in the below output... someone help me to solve in nodejs or in javascript.
var dataCollection = [
{
"data": {
"Oct-2020": 483
}
},
{
"data": {
"Nov-2020": 5
}
},
{
"data": {
"Mar-2020": 8
}
},
{
"data": {
"Apr-2020": 4
}
},
]
I need to sort this array based on the month like
[{
"data": {
"Mar-2020": 8
}
},
{
"data": {
"Apr-2020": 4
}
},
{
"data": {
"Oct-2020": 483
}
},
{
"data": {
"Nov-2020": 5
}
},
]
Thanks in advance