I have a list of dictionary like this
[
{\'id\':1, \'name\': \'name1\', \'education\':{\'university\':\'university1\', \'subject\': \'abc1\'}},
{\'id\':2, \'na
You could simply do the following:
l = [...]
for d in l:
d.update(d.pop('education', {}))
# l
[{'id': 1, 'name': 'name1', 'subject': 'abc1', 'university': 'university1'},
{'id': 2, 'name': 'name2', 'subject': 'abc2', 'university': 'university2'},
{'id': 3, 'name': 'name3', 'subject': 'abc3', 'university': 'university3'}]