If I have an array of objects, like:
[
{name: "First", updated: "2022-10-09"},
{name: "Second", updated: "null"},
{name: "Third", updated: "2022-12-06"}
]
Is there a way to sort in descending order by date without having to resort to creating date objects? And is there a way for it to filter out null values as well. I am not sure if the date as a string here qualifies as an ISO date and is readable as such - can it still be filtered as an ISO date?
So the final result would be:
[
{name: "Third", updated: "2022-12-06"}
{name: "First", updated: "2022-10-09"},
]