I have a list of dictionaries as shown below.
[{'id': 2201187803, 'wind': 0, 'nstid': 294269, 'amrcd': 1, 'insno': '10 Yr Fix', 'fileid': 2007498393, 'arstnme': 'Andy', 'amcd': 1, 'atlstnme': 'America'},
{ 'id': 2201187803, 'wind': 0, 'nstid': 294269, 'amrcd': 1, 'insno': '10 Yr Fix', 'fileid': 2007498393, 'arstnme': 'Amy', 'amcd': 1, 'atlstnme': 'America'}]
my output JSON should look like since field id
is common has value JSON should be appended together
question from:
https://stackoverflow.com/questions/65849407/merge-dictionaries-in-list-if-same-value-in-python 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…