This is my data:
[
{
url: 'www.example.com/hello',
id: "22"
},
{
url: 'www.example.com/hello',
id: "22"
},
{
url: 'www.example.com/hello-how-are-you',
id: "23"
},
{
url: 'www.example.com/i-like-cats',
id: "24"
},
{
url: 'www.example.com/i-like-pie',
id: "25"
}
]
With Lodash, how could I remove objects with duplicate id keys? Something with filter, map and unique, but not quite sure.
My real data set is much larger and has more keys, but the concept should be the same.