It's hard to understand your question since you did not get much context, but it looks like you want to return the result of observable3() to return from observablesFn() . The existing return returned from your nested internal anonymous function, not from your outer scope. I think you want to do something else in this direction.
observablesFn(){ return observable1().map(data1 => { return observable2(data1).map(data2 => { return observable3(data1, data2); }); }); }
This will return from observablesFn() , not its nested inner function.
You must use .map , not .subscribe , as it returns an observable, not a subscription.
source share