i have two observables A and B. I first have to get A until i could take B.
If they are independently i could do something like forkJoin to get the result. But due to the fact i could take B only after i got A i am struggeling a little. I tried switchMap, but seems also not to work.
So what i want to achive is:
- get observable A
- get observable B
combine A and B into a result C
public loadConfiguration(): Observable<ProductConfiguration> { return this.service.getA().pipe( switchMap(response => { return this.service.getB(response.id); } ), map(result => this.getData(result)) // here i want A and B thogether so result should contain A and B ); }
Currently i am a little lost. Regards Oliver