RXJS How to convert observable <T []> to observable <T>
I would like to take an Observable <T []> and convert it to an observable <T> so that each array from Observable <T []> and the individual elements of the arrays are then allocated separately through Observable <T>.
Is there a standard operator for this? I searched but found nothing. Thank.
After heading towards concatMap / flatMap, I came up with the following general solution:
var source: Observable<T[]>;
...
var splitSource = source.flatMap<T>((x:T[]) => { return Rx.Observable.fromArray(x); });
+4
2 answers