Q: Chaining observable in different layers in Angular4 How do I chain observable functions in Angular4 if I want to pass result from one layer to another.
First layer is Data service with Get method.
Second layer is different service where I call to data service get method and subscribe to it to get result.    
Now I want to subscribe to second layer service in my component, so how do I pass value from data service to component via second layer service?
Point is that I don't want to have direct code from data service in component.

I want to subscribe to GetProfile in component, but how do I properly return value here after subscribe aka after value is there from DataService GetOne function?

A: You can probably use do().
public getProfile = () : Observable<any> {
    this.dataService.setEndPoint('api/account/getprofile');
    return this.dataService.GetOne()
        .map(response => response.json())
        .do( response => {
            ......
        }, error => {
            ......
        });
}


A: Hah, I ended up passing how it should been done in the start, not sure what I was thinking to not thing about it in the begining. This is second layer to which I then subscribe in the end:
public GetProfile = (): Observable<any> => {
    this.dataService.SetEndpoint('api/account/getprofile');
    return this.dataService.GetOne();
}

Component:
getProfile(): void{
    this.accountService
        .GetProfile()
        .subscribe(data => {
            this._updateProfileModel = data;

            this._form.setValue({
                firstName: this._updateProfileModel.firstName,
                lastName: this._updateProfileModel.lastName,
                phoneNumber: this._updateProfileModel.phoneNumber
              });
        }, (error) => {
            console.log(error);
        });
}

