I've searched a lot for this but couldn't find anything that match my requirement.
I want to remove all the duplicates but keeping the last entry not the first.
The array is already presorted I don't want to mess with sorting
So it looks like this :
[{
name:"Joe",
status:"foo1" },
{
name:"Joe",
status:"foo2"},
{
name:"Vani",
status:"foo5"
}]
The expected output looks like:
[{
name:"Joe",
status:"foo2"},
{
name:"Vani",
status:"foo5"
}]
I'd be thankful if someone can help me!