title: Avoiding nested subcribe() calls in RxJs 6
body: <p>Sometimes I need a value from previous observable and run another function that depend on that value and so on. It make nested subcribe() calls and then code is very ugly and unmanageable. I have an example here:</p>
  
  <pre><code>getObservableData().subcribe(next=&gt;
      let dialogRef=this.dialog.open(EvalListComponent, {data: next})
      dialogRef.afterClosed().subscribe(next=&gt;{
          let k=dialogRef.componentInstance.getAnotherObservableData()
              .subcribe( next=&gt; doSomthing(next))
  }))
  </code></pre>
  
  <p>What kind of solution can have situation like that. I need some flatten structure. I know there is a pipe function and can be use it with rxjs operators. But how can be it accomplished?</p>