title: Loop through/concat list of http observables using Typescript
body: <p>I have a list of properties that need to be submitted as part of a larger mergeMap operation.</p>
  
  <pre><code>this.customFeedsService.postNewSocialMediaFeed(this.newFeed)
              .mergeMap( newFeed =&gt; this.customFeedsService.postFeedProperties( newFeed.Id, this.feedProps))
              .mergeMap(newProps =&gt; this.customFeedsService.preloadSocialMediaFeed(newProps.FeedId))
              .subscribe(data =&gt; console.log(data), err =&gt; console.log);
  </code></pre>
  
  <p>In my service is where i loop through the properties to create a single Observable that returns to the mergeMap operation.</p>
  
  <pre><code>public postFeedProperties( feedId: number, props: FeedPropertyApi[] ): Observable&lt;any&gt; {
      let observeGroup = new Observable&lt;any&gt;();
      for(let prop of props){
          prop.FeedId = feedId;
          observeGroup.concat(this.apiService.postData(this.feedPropertyApiUrl, prop, true)
              .map(res =&gt; res.json()));
      }
  
      return observeGroup
      // return this.apiService.postData(this.feedPropertyApiUrl, props[0], true)
      //          .map(res =&gt; res.json()).concat(this.apiService.postData(this.feedPropertyApiUrl, props[1],true)
      //          .map(res =&gt; res.json())).concat(this.apiService.postData(this.feedPropertyApiUrl, props[2], true)
      //          .map(res =&gt; res.json()));
  }
  </code></pre>
  
  <p>Now when I run the commented portion, everything works as intended. However, when I run through the loop, I get a <code>Cannot read property 'subscribe' of undefined</code> error. What am I doing wrong in the loop?</p>