I have this object and I want to return a new object sorted by ascending date, taking into account the startTime that is a ISOString. (I'm also using moment) How can I do this?
const clinics = {
"a0CW00000027OX3MAM": {
"id": "a0CW00000027OX3MAM",
"companyName": "Hendrick Medical Center",
"startTime": "2018-08-10T05:30:00.000Z",
},
"a0CW00000026gjJMAQ": {
"id": "a0CW00000026gjJMAQ",
"companyName": "ABC Manufacturing",
"startTime": "2018-08-10T10:36:00.000Z",
},
"a0CW00000026gipMAA": {
"id": "a0CW00000026gipMAA",
"companyName": "ABC Manufacturing",
"startTime": "2018-08-01T10:36:00.000Z",
}
}