title: How to map object array to my type array
body: <p>I have a class:</p>
  
  <pre><code>export class    Stuff {
        id: string;
        namd: string;
      }
  </code></pre>
  
  <p>With <code>angular &lt; 4.3</code> I have this call:</p>
  
  <pre><code>getStuff(): Observable&lt;Stuff[]&gt; {
      return this.http.get('api-url-here/stuff')
          .map((data: Response) =&gt; {
              return data.json()
                  .map((item: any) =&gt; {
                      return {
                      id: item.id,
                      name: item.name
                  };
          });
      })
  }
  </code></pre>
  
  <p>With <code>angular &gt;= 4.3</code> I changed it to this:</p>
  
  <pre><code>getStuff(): Observable&lt;Stuff[]&gt; {
      return this.http.get&lt;Stuff[]&gt;('api-url-here/stuff')
          .map((data: any) =&gt; {
              return data
                  .map((item: any) =&gt; {
                      return {
                      id: item.id,
                      name: item.name
                  };
          });
      })
  }
  </code></pre>
  
  <p>I am receiving the array of stuff fro my api that looking like that.</p>
  
  <pre><code>[
   {"id":1,"name": "name" }
  ]
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/WmLPn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WmLPn.png" alt=""></a></p>
  
  <p>As you can see from the code example above I have to <code>map</code> the data twice to get my type shape (<code>Stuff[]</code>). Is there a better way of doing this with <code>angular 4.3+</code> ?</p>