title: Copying Javascript object attributes
body: <p>I have 1 object coming from the server with multiple properties in which I want to hydrate it into a new object, changing the name of 1 property and keeping the rest.</p>
  
  <p>Code:</p>
  
  <p>JSON: <code>{ UserId: 1, Name: "Woo", Age: 10 }</code></p>
  
  <p>The format of the object I want it in:</p>
  
  <pre><code>var newObj = {}
  newObj.id = jsonObj.UserId;
  //Everything property below here is the same. How can i prevent writing this code?
  newObj.Name = jsonObj.Name;
  newObj.Age = jsonObj.Age;
  </code></pre>
  
  <p>What I'm doing is based on this <a href="https://stackoverflow.com/questions/6600605/backbone-js-parse-1-element-the-id/6601316#6601316">answer</a>, trying to parse some json into a format that requires me to change the name of 1 property.</p>