I have this JSON array of objects by an API call and I want to sort it by date. But the date format is in ISO and i am new to javascript so i don't know how to convert it and then sort it.
"statuses": [
{
"date": "2020-01-31T05:57:32.143Z",
"status": "Awaiting Pickup"
},
{
"date": "2020-01-30T07:55:08.033Z",
"status": "Dispatched"
},
{
"date": "2020-01-18T07:55:08.033Z",
"status": "Parcel Assigned to Rider for Delivery"
},
{
"date": "2020-01-12T07:55:08.033Z",
"status": "Delivered"
},
{
"date": "2020-01-24T07:55:08.033Z",
"status": "Returned"
}
],
}