Run
import json # json string jsonStr = '[{"name":"Tesla", "age":2, "city":"New York"}, { "name":"Tesla", "age":2, "city":"Boston"}]' # parse json file pythonObj = json.loads(jsonStr) print(type(pythonObj)) print(type(pythonObj[0])) city = pythonObj[1]['city'] print(city)
Output