May-26-2020, 01:53 PM
I fixed your tags in the original post. In the second post your indentation is wrong.
Also these
Back to original post - you are overdoing things
1. Read json - get list of dicts
2.iterate over the list and parse each dict
Also these
print
on line 4 and 10 will cause error. If they don't - you are using python2 and you should be using python3Back to original post - you are overdoing things
1. Read json - get list of dicts
2.iterate over the list and parse each dict
import json with open('party.json') as f: data = json.load(f) for trade in data: print(trade["id"], trade["name"])
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs