Use import json and json.loads(text) to decode a JSON string. Then access its fields like those of any other dictionary.
Decoding preserves the shape of the data. A field can hold a list of separate objects.
import json
parcel = json.loads('{"boxes":[{"weight":3},{"weight":7}]}')
print(len(parcel["boxes"])) # 2
print(parcel["boxes"][1]["weight"]) # 7Access one inner record first. To retrieve a field from every record, iterate over the list.
Implement track_titles(text). The JSON object contains a tracks list of objects with a title string. Return the titles in their original order, including duplicates.
track_titles('{"tracks": [{"title": "North"}, {"title": "South"}]}') # ["North", "South"]