sort array of object compare string dates code example
Example: compare two dates and sort array of objects
your_array.sort ( (a, b) => {
return new Date(a.DateTime) - new Date(b.DateTime);
});
your_array.sort ( (a, b) => {
return new Date(a.DateTime) - new Date(b.DateTime);
});