How to map a response from http.get to a new instance of a typed object in Angular 2 [duplicate]
This question already has an answer here: How do I cast a JSON object to a typescript class 17 answers 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. Take a look at this Plunk 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