title: Angular subscribe to observable then return a new one
body: <p>I'm using HttpClient to <code>get</code> data from a webservice.  I want to subscribe to the resulting data and convert it from JSON into actual classes, and then have an <code>Observable</code> of those classes returned from the method.  Basically when the caller's <code>subscribe</code> fires I want it to get the classes.</p>
  
  <p>I'm pretty new to angular and observables, so I'm not sure how to do that chaining.  So I'm wanting something like:</p>
  
  <pre><code>constructor(private http: HttpClient) {}
  
  getExistingArsByLab(labId: number) : Observable&lt;EhsAssessmentAr[]&gt; {
      return this.http.get("...")
          .subscribe(json =&gt; json.map(obj =&gt; {
              let ar = new EhsAssessmentAr();
              ar.id = obj['id'];
              ...
              return ar;
      }));
  }
  </code></pre>
  
  <p>which of course doesn't actually compile and then the caller would just do:</p>
  
  
  
  <pre><code>this.getExistingArsByLab(12).subscribe(ars =&gt; { ... });
  </code></pre>
  
  <p>and at that point I'd have <code>ars</code> as an actual <code>EhsAssessmentAr[]</code>.</p>