title: RXJS Wait for All Observables to Complete and Return Results
body: <p>I'm trying to create a RX stream that will execute a list of XHR calls async and then wait for them to complete before going to the next call. </p>
  
  <p>To help explain this could be written like this in normal JS:</p>
  
  
  
  <pre class="lang-typescript prettyprint-override"><code>try {
      await* [
          ...requests.map(r =&gt; angularHttpService.get(`/foo/bar/${r}`))
      ];
  } catch(e) { throw e }
  
  // do something
  </code></pre>
  
  <p>This is the code I was trying but its running them individually and not waiting for them all to complete before proceeding. (This is a NGRX Effect stream so it is slightly different from vanilla rx).</p>
  
  <pre class="lang-typescript prettyprint-override"><code>mergeMap(
          () =&gt; this.requests, concatMap((resqests) =&gt; from(resqests))),
          (request) =&gt;
              this.myAngularHttpService
                  .get(`foo/bar/${request}`)
                  .pipe(catchError(e =&gt; of(new HttpError(e))))
      ),
      switchMap(res =&gt; new DeleteSuccess())
  </code></pre>