How can I flatten a List of dictionary with nested dictonaries, say I have the following dict:

```
data = [
            { 'Name':'xyx',
            'Age':22,
            'EmpDetails':{'Salary':100,'Job':'Intern','Location':'TER'}
            },
            { 'Name':'abc',
                'Age':23,
                'EmpDetails':{'JoinDate':'20110912','Salary':200,'Job':'Intern2','Location':'TER2'}
            },
            {'Name':'efg',
                'Age':24,
                'EmpDetails':{'JoinDate':'20110912','enddate':'20120912','Salary':300,'Job':'Intern3','Location':'TER3'}
            }
       ]

```

i would need the EmpDetails Node removed and move its values one level up, like below

```
data = [
            { 'Name':'xyx','Age':22,'Salary':100,'Job':'Intern','Location':'TER'},
            { 'Name':'abc','Age':23,'JoinDate':'20110912','Salary':200,'Job':'Intern2','Location':'TER2'},
            {'Name':'efg','Age':24,'JoinDate':'20110912','enddate':'20120912','Salary':300,'Job':'Intern3','Location':'TER3'}
       ]

```

i am this now using below, is there any faster way of doing this?

```
newlist = []
for d in data:
    empdict ={}
    for key, val in d.items():
        if(key!='EmpDetails'):
            empdict[key] = val
        if(key=='EmpDetails'):
            for key2, val2 in val.items():
                empdict[key2] = val2
    newlist.append(empdict)

```