title: Angular HttpClient map observable array of objects
body: <p>What is the simplest way to map each object of the result (Rxjs Observable) to an another object when querying an array of objects using angular HttpClient? </p>
  
  <p>I'm currently doing it like below but is there a way to avoid "double mapping"?</p>
  
  <p>In the example the end result needs to be <code>Observable&lt;Entry[]&gt;</code> with the constructor called for each <code>Entry</code>-object:</p>
  
  <pre><code>public getList(): Observable&lt;Entry[]&gt; {
    const url = "/entries/";
    return this.httpClient.get&lt;Entry[]&gt;(url)
      .map((entries: any[]) =&gt; entries.map((e) =&gt; new Entry(e)));
  }
  </code></pre>