Consider:
[{'x': 'ABC-1|ABD-5',
'y': 8,
'z': 2,
'aa': {'az': 0.1001692265},
'bb': {'z': 0.0816721693}}]
How can I update the nested dictionary's value for the same key such that it becomes:
[{'x': 'ABC-1|ABD-5',
'y': 8,
'z': 2,
'aa': {'az': 0.1001692265},
'bb': {'z': 2}}]
Any ideas?
Edit: Looking for a more dynamic solution where I could repurpose this for any dict with different keys