Let's say I have a list of dicts. I define "duplicates" as any two dicts in the list that have the same value for the field "id" (even if the other fields are different). How do I remove these duplicates.
An example list would be something like:
[{'name': 'John' , 'id':1}, {'name': 'Mike' , 'id':5},{'name': 'Dan' , 'id':5}]
In this case, 'Mike' and 'Dan' would be duplicates, and one of them needs to be removed. It doesn't matter which one.