How can I make my code run sequentially? For example,
If I have a for loop which gets some data from a service, I want the n+1 iteration to run
n+1
I suggest adapting it to use the zip "combining operator" from rxjs:
zip
http://reactivex.io/documentation/operators/zip.html
EDIT: here is an example: https://www.learnrxjs.io/operators/combination/zip.html
Although in your case you would have to pass it as an array probably ( zipArray).
zipArray