Reputation: 59
import json
f = open('csvjson.json')
data = json.load(f)
for i in data:
for name in i['name']:
print(name)
This is my JSON File:
https://drive.google.com/file/d/1w-r84H7vAy6VD9V_kP8wH63_J2jJBv86/view?usp=sharing
When I run the code from the main.py file, the output I get it:
https://pastebin.com/FSRd88KM
The code is like that, one letter per line, how would I fix that.
Upvotes: 0
Views: 198
Reputation: 39374
Did you mean to just print the whole name, not each letter of the name:
for i in data:
print(i['name'])
Upvotes: 1