Hi I am having hard time trying to figure this out. There is some bunch of other problem.
Can anyone help me making Observable<[Observable<CellModel>] to Observable<[CellModel]>?
the outcome for the request(categoryId: $0) was Observable<[Observable<CellModel>?]>
selectCategory
.do(onNext: { _ in output.cells.onNext([.init(cellID: kSkeletonTableID)]) })
.flatMap { [unowned self] in request(categoryId: $0) }
// .showIndicator()
.trackError(errorTracker)
.compactMap {
var cellModel:[CellModel] = $0.flatMap { $0 }
return cellModel
}
.bind(to: output.cells)
.disposed(by: disposeBag)