title: Taking inner observables when outer is complete
body: <p>I'm new to RxJS so not even sure if I gave a proper title to a question.</p>
  
  <p>To explain what I'm trying to achieve: I have one API endpoint which results in array of objects with ids. Then I will call another API endpoint with each id I got in array, in many calls.
  I want the data, subscriber of first API gets, to already include response of second API call.</p>
  
  <p>StackBlitz: <a href="https://stackblitz.com/edit/rxjs-u45wvq" rel="nofollow noreferrer">https://stackblitz.com/edit/rxjs-u45wvq</a></p>
  
  <p>currently, values of <code>thatThing</code> are observables - and I want them to be the received objects.</p>
  
  <h1><strong>Edit</strong></h1>
  
  <p>I managed to achieve what I wanted, but it looks dirty in my opinion - since the solution uses <code>Promise</code> class to work it out.</p>
  
  <p><a href="https://stackblitz.com/edit/rxjs-d5ywen" rel="nofollow noreferrer">https://stackblitz.com/edit/rxjs-d5ywen</a></p>
  
  <p>I wander if there's RxJS way to do the same:</p>
  
  <pre><code>const source = fetchApi1().pipe(
    map(x =&gt; {
      return new Promise((yes, no) =&gt; {
        const s = x.array.map(m =&gt; fetchApi2(m.id))
        forkJoin(...s).subscribe(api2 =&gt; {
          x.array.forEach((row, i) =&gt; {
            row.thatThing = api2[i]
          })
          yes(x)
        })
      })
    }),
    switchMap(x =&gt; from(x))
  );
  </code></pre>