RxSwift,将MFA的Observable <[array]>划分为Observable <a>, Observable<b>

时间:2018-12-12 05:59:15

标签: swift rx-swift

I have a question abou RxSwift.

I have Observable<[Array]> and I need to separate it with Observable

How could I divide the observable Observable<[Array]> into observable ... N and do flatMap for each observable ?

1 个答案:

答案 0 :(得分:0)

还有一个.flatMap()-

let array: Observable<[Array]> = ...
let items: Observable<ItemType> = array.flatMap { Observable.from($0) }.flatMap { /* */ }