title: RxJS: MergeMap with Preserving Input order
body: <p><strong>Requirement:</strong></p>
  
  <p>urls = [url1, url2, url3]</p>
  
  <p>Fire all 3 urls parallely and paint the Dom in the sequnce of the urls list</p>
  
  <pre><code> ex: Finished order of urls = [url3, url1, url2]
       when url1 finishes Immediately render the DOM, without waiting for url2
       If url2, url3 finishes before url1, then store url2, url3 and paint the DOM after url1 arrives
       Paint the DOM with order [url1, url2, url3]
  </code></pre>
  
  <p><strong>My Work using promises:</strong></p>
  
  <pre><code>// Fired all 3 urls at the same time
  p1 = fetch(url1)
  p2 = fetch(url2)
  p3 = fetch(url3)
  
  p1.then(updateDom)
    .then(() =&gt; p2)
    .then(updateDom)
    .then(() =&gt; p3)
    .then(updateDom)
  </code></pre>
  
  <p>I wanted to do the same thing in Observables.</p>
  
  <pre><code>from(urls)
    .pipe(
        mergeMap(x =&gt; fetch(x))
    )
  </code></pre>
  
  <p>To fire them parallely I used merge map, but how can I order the sequence of the results?</p>