skip to Main Content

Can't extract data from the JSON file

I don't understand why I can't print out the data from "label". After what I've looked up this should do it: import json json_str = '{mechanisms": {"label": "Mechanismen", "type": "MechSections"}}' data = json.loads(json_str) print(data['mechanisms'][0]['label']) Instead of giving me the content…

VIEW QUESTION
Back To Top
Search