How to iterate through JSON

Hi all.

I would like to iterate through some JSON that is returned from an API call.
At the end of the JSON file is a total that tells me how many items are in the file.
I want to take that value and create a for loop to iterate through the file grabbing the info I need from each item.

I know how to get the total value:
totalitem = rep.json()[“Total”]

I cannot figure out how to perform a for loop that will count from 0 to the total value I get from the file.

Can someone help?

Can I suggest asking in the Discord group. You are more likely to get a response there for this sort of question.

OK thanks. Do you have the URL?

1 Like