Answer the question
In order to leave comments, you need to log in
Pausing the loop before executing a query within an iteration?
In general, I got a little bad api, I make requests from the node with the request module.
The bottom line is, to get one data record, you need to make two requests.
1st request - I set the active id
2nd request - I get data by active id
And everything would be fine, but only the active id is tied to a single api key, you can only receive data by one id at a time.
At the input I have an array of id, it turns out you need to wait until both requests are completed, take the next id from the list and again two requests.
It never occurs to me how to solve it, at least beautifully.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question