I have a list of dictionaries:
foo = [{'date':'01-08-2022', 'pre_val':90, 'cur_val':100},{'date':'02-08-2022', 'pre_val':70, 'cur_val':100},{'date':'01-08-2022', 'pre_val':60, 'cur_val':50}]
I would like to add all the duplicate day's values
bar = [{'date':'01-08-2022', 'pre_val':150, 'cur_val':150},{'date':'02-08-2022', 'pre_val':70, 'cur_val':100}]
Can anyone help me with this?