I currently have the following list of dicts:
[
{'id': '1', 'sim': 0.81},
{'id': '1', 'sim': 0.72},
{'id': '2', 'sim': 0.85},
{'id': '2', 'sim': 0.81},
{'id': '2', 'sim': 0.72}
]
I'd like to remove the duplicates which have not the highest sim and get the following:
[
{'id': '1', 'sim': 0.81},
{'id': '2', 'sim': 0.85},
]