title: How do I resolve an Observable inside of another Observable? - rxjs
body: <p>I have an <code>Observable</code> in which I consume another observable, but the 2nd <code>Observable</code> I can't get to resolve.  Here is the code:</p>
  
  <pre><code>return Observable.fromPromise(axios(config))
          .map(res =&gt; {
              return {
                  accessToken: res.data.access_token,
                  refreshToken: res.data.refresh_token                
              }
          })
          .map(res =&gt; {
              return {
                  me: getMe(res.accessToken),
                  accessToken: res.accessToken,
                  refreshToken: res.refreshToken                
              }
          })
  
  function getMe(accessToken) {
      return Observable.fromPromise(axios.get({
          url: 'https://api.spotify.com/v1/me',
      }));
  }
  </code></pre>
  
  <p>The <code>getMe</code> function returns an <code>Observable</code>, but it is never resolved.  I have tried to add a <code>flatMap</code> and a <code>concat</code>, but it still isn't resolved.  How do I get the <code>getMe</code> to resolve?</p>