For your use case, I think that the flatMap operator is what you need: this. In this article we like to learn about the very powerful flatMap. Figure: FlatMap created by ReactiveX licensed under. What is the difference between map and flatMap? We made calls to fromPromise() and flatMap() when we defined our source stream:. An object is deemed iterable if it has an implementation for the Symbol. Some built-in types like Array , Map.
It works now because flatMap subscribes to each item in the sequence and returns that value.