I have a question.
I need to get list of some items by a list of the item ids. At first, I tried
Observable.from(itemIds)
.flatMap(itemId -> requestToServer(itemId))
.subscribe(item -> { /* do something */ });
But the operator flatMap
does not guarantee the order of items.
I need to get item in order that ItemIds
have.
It would be great if there was the api like Promise.all()
.
Is there a way like Promise.all()
in RxJava? or any other ways?