Split Dictionary - Ordered collection

Viewed 18

I'm doing a fetch using an api and there is a limit of how many coins I can fetch at the same time, I'm trying to split my dictionary into multiple so I can fetch multiple times.

I have the following dictionary using Ordered collection [String: [[Coins: Int]]]

The key String is an address, e.g. "0x1d...54" Each address is unique (because they are keys of the dict.), but each address can contain the same Coin.

Given a limit, for example 466, how can I split that dictionary so I have 466 coins in 1 array? Here's the desired result:

[[String: [[String: Coin]]]]

that would be multiple dictionaries inside the array based on that limit. So I can iterate through that array.

0 Answers
Related