I currently have an existing rxjs Subject and I am looking for a way to call another Observable and seamlessly merge the results of that observable into my Subject. My goal is to achieve this without explicitly calling subscribe on the child Observable.
Unfortunately, using Subscribe.next() necessitates providing a value, and utilizing switchMap directly on the subject does not trigger the switchMap and child call as intended.
// initializing subject in class definition
mySubject$ = new Subject();
// function to call api and observable
callApi(options) {
// obtaining an observable from the api call
const apiResults$ = getApiResults(options);
// this method works but it requires subscribe
apiResults$.subscribe(results => this.mySubject$.next(results));
// how can I effectively combine the results into the Subject without
// relying on the subscribe method (above)
mySubject$.next(????);
}