Iterate through a nested Dictionary and Sub Dictionary in Python
<p><strong>JSON:</strong></p>

<pre><code>data = {"result":[{"name":"Teddy","list":{"0":"24","1":"43","2":"56"}},
           {"name":"Barney","list":{"0":"24","1":"43","2":"56"}]}
</code></pre>

<p><strong>Code:</strong> </p>

<pre><code>i = 0
j = 0
for p in data['result']:
    print('Name: ' + p['name'])
    for v in p['list']:
        i += 1
        print("{0} : {1}".format(i,v[j]))
        j += 1
</code></pre>

<p>I am trying to access each value and print them out, but unfortunately, without any success, any help is appreciated.</p>

<p>I have seen: <a href="https://stackoverflow.com/questions/10756427/loop-through-all-nested-dictionary-values">Loop through all nested dictionary values?</a> </p>