title: Combining two observable streams in Angular2 using RxJS .flatmap
body: <p>I have an Observable in a Service (called ContentService) that I have written in my Angular2 app, is looks like this (I have edited this down / reduced the content for easier reading):</p>
  
  <pre><code>@Injectable()
  export class ContentService {
  
      constructor(private http:Http, private apiService:ApiService) {
  
          this.content = this.http.get('src/i18n/en.json')
              .map((res:Response) =&gt; {
                  let json: {} = res.json();
                  return mapData(json);
              })
  
          mapData() {
              // function stuff to format data
          }
  </code></pre>
  
  <p>Now, I wish to make a call to my injected apiService, this returns a JSON object that has the same structure as what is produced by <code>this.content</code>. Please note that <code>this.content</code> comes from a local json file and apiStream comes from a third party API / http feed. I need to concatinate (or add) the results of the apiService to the <code>this.content</code> observable. I think flapMap is the best way around this but I am making some syntax mistakes (if I am going about this the correct way). I was thinking of adding the new content like so</p>
  
  <pre><code>this.content = this.http.get('src/i18n/' + this.userLang + '.json')
              .map((res:Response) =&gt; {
                  let json: {} = res.json();
                  return mapData(json);
              })
              .flatMap(() =&gt; {
                  apiService.getAllCurrentListings().subscribe(response =&gt; {
                      return mapData(response);
                  })
              });
  </code></pre>
  
  <p>However this is producing an error so I am obviously doing something wrong. Should I want to call my API service like when not in a <code>.flapMap</code> I get the data I desire so I have obviously made a syntax error. How do I add the apiService data to my original <code>this.content</code> call results?</p>
  
  <p>Many thanks in advance.</p>