Newbie: How can I do multiple network.request based on the information gathered from a first network request?

Hi.

I have a setup like this.

I have to run an initial network request wich fetches a json containing among other a bunch of ID’s this can be everything from 1 to in theory unlimited ID’s om an url somethin like www.example.com/api/mainlist

I create a table that looks something like table[*ID*] = {}

Then for each ID I fetch, I need create a table for that ID and the contents of the table should be fetched from another network.request which gets another json. The url to this second json file is something like www.example.com/api/{ID}/characters

Then I need to assign key/value pairs to the correct table something like:

table[*ID*][charID] = “charName”

As I have no way to pass custom parameters to the listener of network.request. I dont see how I can do this?

Thank you for all help

You may of already worked it out but when you call www.example.com/api/{ID}/characters there must be {ID} returned in the JSON and you can use that to tie request to response?

Thank you,

Yes I accually solved it that way just a few hours ago by doing the change in the json returned :slight_smile:

You may of already worked it out but when you call www.example.com/api/{ID}/characters there must be {ID} returned in the JSON and you can use that to tie request to response?

Thank you,

Yes I accually solved it that way just a few hours ago by doing the change in the json returned :slight_smile: