0

I have the following example:

val strings: List<Observable<String>> = listOf(
                Observable.just("One"),
                Observable.just("Two"),
                Observable.just("Three")
        )

I tried to use combineLatest, zip, merge to convert the above strings into the following but I failed:

val convertedStrings: Observable<List<String>> = strings.xxxx()

Is there RxJava-approach to achieve the above conclusion?

malhobayyeb
  • 2,725
  • 11
  • 57
  • 91

1 Answers1

0

How about:

Single<List<String>> list = Observable.concat(strings).toList();

?

(There is also a chance that you are looking for concatEager.)

EpicPandaForce
  • 79,669
  • 27
  • 256
  • 428