How can I sort a list of 2 strings with dates inside them so that the earlier one always comes first? The date is always after the second comma.
For example,
const example =
["AAA,5,2020-09-17T21:14:09.0545516Z",
"AAA,0,2020-09-03T20:38:08.3946643Z"]
sortStrings(example: string[]) {
// how to sort to let earlier date come first
}