import json sampleJson = """{ "company":{ "employee":{ "name":"emma", "payble":{ "salary":7000, "bonus":800 } } } }""" # write code to print the value of salary
Expected Output:
7000
Solution:
import json sampleJson = """{ "company":{ "employee":{ "name":"emma", "payble":{ "salary":7000, "bonus":800 } } } }""" data = json.loads(sampleJson) print(data['company']['employee']['payble']['salary'])
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Solution:
need an explanation for this answer? contact us directly to get an explanation for this answer