combine two observables rxjs code example
Example: rxswift combine two observables
Observable.combineLatest(
sourceObservableA, sourceObservableB,
resultSelector: { value1, value2 in
print("\(value1) \(value2)")
}).observeOn(MainScheduler.instance)
.subscribe()
.disposed(by: disposeBag)