How to manipulate list of list of dictionaries
<p>Hi there i have a wired situation here that i want to manipulate a dictionary key value which is  list of lists include dictionaries here is the formation of the data i have </p>

<pre><code>my_list=[{'data': [[{'name': [0.0, 0.0]}], [{'name': [False, False]}], [{'name': [u'xm', u'xc']}]],'name': u'new',}]
</code></pre>

<p>what i want to do is to convert this to : </p>

<pre><code>my_list=[{'data': [[{'name': 0.0},{'name': 0.0}], [{'name': False},{'name': False}], [{'name': u'xm'},{'name': u'xc'}]],'name': u'new',}]
</code></pre>

<p>what i have tried so far is : </p>

<pre><code>new_lists = []
for new in x[0]['data']:
    for new_list in new:
        for g in new_list['name']:
            new_list['name'][new_list['name'].index(g)] = {'name': g}
for stay in x[0]['data']:
    new_lists.append(stay[0]['name'])
x[0]['data']=new_lists
print(x)
</code></pre>

<p>could i have some help here ? </p>

<p>Here we go, a version independant from keys value :</p>



<pre><code>my_list=[{'data': [[{'foo': [0.0, 0.0]}], [{'bar': [False, False]}], [{'pop': [u'xm', u'xc']}]]}]

buff = []
for elt in my_list[0]['data']:
    a = []
    k = elt[0].keys()[0]
    val = elt[0][k]
    for i in val:
        a.append({k: i})
    buff.append(a)

output = [{'data': buff}]
</code></pre>

<p>Results :</p>



<pre><code>[{'data': [[{'foo': 0.0}, {'foo': 0.0}], [{'bar': False}, {'bar': False}], [{'pop': u'xm'}, {'pop': u'xc'}]]}]
</code></pre>

python list dictionary