title: Javascript downcasting object
body: <p>I want to know if there is a native way to downcast an object.</p>
  
  <p>I mean, if I have an object like this: <code>person1 = {name: 'Doe', age: 25};</code></p>
  
  <p>And other like: <code>person2 = {name: ''};</code></p>
  
  <p>Is there <em>someFunction</em> that can be used to do something like: <code>var person = somefunction(person2, person1);</code> And get <code>person = {name: 'Doe'}</code>?</p>
  
  <p>Or is there an approach with prototypes?</p>
  
  <p>Thanks.</p>