title: How to map a response from http.get to a new instance of a typed object in Angular 2
body: <p>I'm trying to get an understanding in how to map the result from a service call to an object using http.get and Observables in Angular 2. </p>
  
  <p>Take a look at this <a href="http://plnkr.co/edit/xylZgx" rel="noreferrer">Plunk</a></p>
  
  <p>In the method getPersonWithGetProperty I'm expecting to return an Observable of type PersonWithGetProperty. However! I can't access the property fullName. 
  I guess that I would have to create a new instance of the class PersonWithGetProperty and map the response to this new object using the class constructor. But how do you do that in the method getPersonWithGetProperty?</p>
  
  <pre><code>import {Injectable} from '@angular/core';
  import {Http, Response} from '@angular/http';
  import {Observable} from 'rxjs/Rx';
  
  export class PersonWithGetProperty {
    constructor(public firstName: string, public lastName: string){}
  
    get fullName(): string {
      return this.firstName + ' ' + this.lastName;
    }
  }
  
  @Injectable()
  export class PersonService {
      constructor(private http: Http) {
      }
  
      getPersonWithGetProperty(): Observable&lt;PersonWithGetProperty&gt; {
          return this.http.get('data/person.json')
           .map((response: Response) =&gt; &lt;PersonWithGetProperty&gt;(response.json()));
      }
  }
  </code></pre>