[Solved] how to read multiple json values?


If you use the following code, response being your json:

data = response['data']['students']

for student in data:
    print('{} {}:'.format(student['name'], student['lastname']))
    for grade in student['grades']:
        print('\t{} - {}'.format(grade['subject'], grade['score']))

This is what you’d get:

Peter Henderson:
        math - A
        english - B
Nick Simons:
        math - B
        english - C

0

solved how to read multiple json values?