title: Redux Observable: How to use action.payload in latter part of chain?
body: <p>I've ran into this issue quite a few times where I want to access <code>action.payload</code> further down the chain. But by then, the argument passed to <code>mergeMap</code> has already changed to something else.</p>
  
  <p>Given my action looks like this:</p>
  
  <pre><code>{
    type: BUY_GEMS,
    payload: { value: 123, productIdentifier: "ABC123" }
  }
  </code></pre>
  
  <p>And this epic:</p>
  
  <pre><code>function purchaseGems(action$, store) {
    return action$
      .ofType(BUY_GEMS)
      .mergeMap(action =&gt; {
        const { productIdentifier } = action.payload; // &lt;-------- works because it's the first mergeMap in this sequence
        return Observable.fromPromise(
          // Some promise call
        ).catch(error =&gt; Observable.of(buyGemsRejected(error)));
      })
      .mergeMap(action =&gt; {
        const { value } = action.payload; // &lt;----------- doesn't work because "action" is now just the response of the Promise above.
        ...
      });
  }
  </code></pre>
  
  <p>How would I do this?</p>