title: Merging http observables using forkjoin
body: <p>I'm trying to avoid nested observables by using <code>forkjoin</code>. The current (nested) version looks like this:</p>
  
  <pre><code>  this.http.get('https://testdb1.firebaseio.com/.json').map(res =&gt; res.json()).subscribe(data_changes =&gt; {
      this.http.get('https://testdb2.firebaseio.com/.json').map(res =&gt; res.json()).subscribe(data_all =&gt; {
        /* Do this once resolved */
        this.platform.ready().then(() =&gt; {
          this.storage.set('data_changes', data_changes);
          this.storage.set('data_all', data_all);
          document.getElementById("chart").innerHTML = "";
          this.createChart();
        });
      });
    },
  
      err =&gt; {
        this.platform.ready().then(() =&gt; {
          console.log("server error 2");
          document.getElementById("chart").innerHTML = "";
          this.createChart();
        });
      });
    }
  </code></pre>
  
  <p>I can rewrite the first part as:</p>
  
  <pre><code>Observable.forkJoin(
    this.http.get('https://testdb1.firebaseio.com/.json').map((res: Response) =&gt; res.json()),
    this.http.get('https://testdb2.firebaseio.com/.json').map((res: Response) =&gt; res.json())
  )
  </code></pre>
  
  <p>But i'm not sure how I would then add the <code>.subscribe</code> method to access both <code>data_changes</code> and <code>data_all</code>.</p>
  
  <p>Looking at another example, I know it should look something like <code>.subscribe(res =&gt; this.combined = {friends:res[0].friends, customer:res[1]});</code>, but i'm not sure how to adapt this to my example. </p>