I have an array that follows this format:
[{"id":1,"date":"2019-09-05T00:00:00.000"},{"id":1,"date":"2019-06-05T00:00:00.000"},
{"id":2,"date":"2019-07-05T00:00:00.000"},{"id":2,"date":"2019-04-05T00:00:00.000"}]
What I would like is to filter this array such that for each id, I get the latest date value.
So in the given example I would like to return:
[{"id":1,"date":"2019-09-05T00:00:00.000"},{"id":2,"date"="2019-07-05T00:00:00.000"}]