0

Trying to simply print the second level of a JSON object

url = requests.get(url, headers=header)
    with url as result:
        # Check web response
        if result.status_code == 200:
            data = result.json()
            for obj in data['data']['attributes']:
                print(obj)

This prints all the values under attributes..there is about a dozen. How can I print the values of each of those keys without explicitly naming them?

0 Answers0