Observable - converting 2 promises into an observable
<p>I have a popular scenario where I need to create one promise that returns data which is fed to a second promise.
If the first promise fails, I need to cancel the second promise.
In 'Promise' land it would look something like this:</p>

<pre><code>Fn1.doPromise( initialData )
  .then(info =&gt; {
        Fn2.doPromise( info )
              .then(result =&gt; {
                  //success - return result
              })
              .catch(error =&gt; {
                //error
              });
  })
.catch(error =&gt; {
  //cancel 2nd promise and show error
});
</code></pre>

<p>Now I am trying to learn the best way to do this using Observables with something like RxJS. Can anyone give me a good solution ? 
Thank in advance !</p>