1import json
2
3def main():
4
5 # create a simple JSON array
6 jsonString = '{"key1":"value1","key2":"value2","key3":"value3"}'
7
8 # change the JSON string into a JSON object
9 jsonObject = json.loads(jsonString)
10
11 # print the keys and values
12 for key in jsonObject:
13 value = jsonObject[key]
14 print("The key and value are ({}) = ({})".format(key, value))
15
16 pass
17
18if __name__ == '__main__':
19 main()
1for restaurant in data['restaurants']:
2 print restaurant['restaurant']['name']