JSON:
data = {"result":[{"name":"Teddy","list":{"0":"24","1":"43","2":"56"}},
{"name":"Barney","list":{"0":"24","1":"43","2":"56"}]}
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
I am trying to access each value and print them out, but unfortunately, without any success, any help is appreciated.
I have seen: Loop through all nested dictionary values?