title: How to copy in Angular 2 only specific fields object into another object
body: <p>is there a method to fill a local object in Angular 2 without deleting some attributes? For example, I have a <code>A</code> object:</p>
  
  <pre><code>export class A {
      first: string;
      second: string;
  }
  </code></pre>
  
  <p>Then I get a response like this in <code>B</code>:</p>
  
  <pre><code>{
      "first": "bob"
  }
  </code></pre>
  
  <p>Now I how to do something like that:</p>
  
  <pre><code>public a: A; // first and second are undefined
  // Retrievethe response in b
  this.a = b; // **Without doing fields for fields**
  </code></pre>
  
  <p>But <code>b</code> has no <code>second</code> attribute, so now <code>a</code> object has no more the <code>second</code> attribute but I have that it is <code>undefined</code>. I see that for forms there is <code>patchvalue</code> method, but it's valid only for forms...</p>
  
  <p>Thanks</p>