Asked • 03/18/19

Parsing values from a JSON file?

I have this JSON in a file: { "maps": [ { "id": "blabla", "iscategorical": "0" }, { "id": "blabla", "iscategorical": "0" } ], "masks": [ "id": "valore" ], "om_points": "value", "parameters": [ "id": "valore" ] }I wrote this script which prints all of the json text: json_data=open(file_directory).read() data = json.loads(json_data) pprint(data)How can I parse the file and extract single values?

1 Expert Answer


Nathan P. answered • 03/22/19

4.9 (30)

Software Engineer Intern @ Honda

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.


Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.