Run
import json # Given JSON string json_str = '{"name":"Tesla", "age":2, "city":"New York"}' # Parse json string python_obj = json.loads(json_str) # Print type of object print("Type of object :", type(python_obj)) # Read value from Python dictionary using key name = python_obj['name'] print(name)
Output