title: How to map http response to client model type in Angular
body: <p>I have model MyObejct like this in client:</p>
  
  <pre><code>class MyObject{
   id: number;
   name: string;
   active: boolean;
  }
  </code></pre>
  
  <p>And the http response json data like this:</p>
  
  <pre><code>[
   {
    id: "1",
    name: "object1",
    active: "true",
   }
  ]
  </code></pre>
  
  <p>The http response is key-value pair, and all the value type is string. So how can I map the http response to 'MyObject' type.
  The http get function is like this:</p>
  
  <pre><code>getMyObejct(name: string): Observable&lt;MyObject&gt; {
   const url = this.url + 'name/' + name;
   return this.http.get&lt;MyObject&gt;(url);  // This is part I'm confused
  }
  
  getAllObjects(): Observable&lt;MyObject[]&gt; {
   return this.http.get&lt;MyObject&gt;(this.url); // How to map this reponse to MyObject
  }
  </code></pre>
  
  <p>The http response values are all string type, but MyObject has types number and boolean. How can I do that?</p>