title: How do I pipe/map to return an array in Angular 7
body: <p>When I make a GET call via HttpClient I want to pass back an array of the actual typed objects, vs. just a generic 'object', and so I tried to do this:</p>
  
  <pre class="lang-js prettyprint-override"><code>getExistingArsByLab(labId: number): Observable&lt;EhsAssessmentAr[]&gt; {
      return this.http
          .get&lt;EhsAssessmentAr[]&gt;(`${this.baseUrl}/ar?labId=${labId}`)
          .pipe(
              map(x =&gt; {
                  const ret = EhsAssessmentAr.fromJson(x);
                  ret.ar = this.sanitizer.sanitize(SecurityContext.HTML, ret.ar.replace(/\n/g, '&lt;br/&gt;'));
                  return ret;
              })
          )
  }
  </code></pre>
  
  <p>That <code>fromJson</code> method is declared to return the proper class, and I thought since I was sending this through <code>map</code> that I'd get back an array.  I'm REALLY new to RxJs so I'm sure I'm just doing something completely stupid there.</p>
  
  <p>I'm getting theerror:</p>
  
  <blockquote>
    <p>TS2322: Type 'Observable&lt;EhsAssessmentAr>' is not assignable to type 'Observable&lt;EhsAssessmentAr[]>`</p>
  </blockquote>