Today I finally stumbled upon the solution of a really trivial RX problem: Suppose you have an Observable which returns Lists of items. Like
Observable<List<String>>. You often receive something like this as responses from web APIs.
However chances are you want to operate on the single items, in this case the Strings.
flatMapIterableto the rescue! This handy operator flattens a stream ofIterablesinto a stream generated from the single items of theseIterablesby means of a mapping function.
RxJava: flattening a stream of Iterables | by Sven Bendel
I'm writing in .NET Core if that matters.
Example in RxJava: Convert Observable<List<Car>> to a sequence of Observable<Car> in RxJava