Question on Dictionary Repeat

Hello all,
I’m using the COVID tracking APIs to try and generate some charts in Charty ( They have a single call that returns a ton of historical data (

I want to use that and then loop on it to create the chart. So I started using the “Repeat with Each” action in Shortcuts. I want to only loop on the last 2 or 3 weeks though, and there is no way that I can find to only do that loop X number of times. Does anyone know a way to do that?

My work around at the moment is to do a call for each day, but that’s a lot of network calls and ends up being fairly slow. Here is a link to that version of the shortcut:

Any help here would be appreciated!

The following is a quick example of one way you might want to consider approaching this. In this example, the first 6 indexed dictionary entries are retrieved.

If the number of entries you want to retrieve remains constant (eg, always grab the first 14 or first 21 days as you describe) this could work.

1 Like

Thanks, that did exactly what I was looking for! Final shortcut here with Charty integration: