import json
# some JSON, could be a file opening :
x = '{ "name":"John", "age":30, "city":"New
York"}'
# parse x:
y = json.loads(x)
# the result is a
Python dictionary:
print(y["age"])
my_string = '[{"name": "sarah", "grade": 10}]' # create json
my_json_string = json.loads(my_string) # turn it in a dictionary
print(my_json_string[0]['name']) # [0] in list we have to assess to the related element