anny-booking-automation/resource_id_helper.py

9 lines
220 B
Python
Raw Normal View History

2026-02-05 15:18:19 +01:00
import json
with open("nice.json", "r", encoding="utf-8") as f:
data = json.load(f)
for i in data["data"]:
2026-02-06 17:42:40 +01:00
print("%-32s id: %s" % (i["attributes"]["name"], i["id"]))
2026-02-05 15:18:19 +01:00
print(type(data)) # usually <class 'dict'>