9 lines
222 B
Python
9 lines
222 B
Python
import json
|
|
|
|
with open("nice.json", "r", encoding="utf-8") as f:
|
|
data = json.load(f)
|
|
|
|
for i in data["data"]:
|
|
print ("%-32s id: %s" % (i["attributes"]["name"], i["id"]))
|
|
print(type(data)) # usually <class 'dict'>
|
|
|