I have a list of dates saved from a <input id="datepicker" type="datetime-local">
element. The format I get from the input element is like 2020-03-27T23:39:12
.
My array is similar to:
[
{id:"asda2", date: "2020-03-27T23:39:12"},
{id:"lj231", date: "2020-03-27T22:45:02"},
{id:"pqeng", date: "2020-03-27T21:58:15"}
]
I want to sort the array objects by date, and get the earliest date.