Given two objects, how can I update one objects properties based on another
<p>I am trying to match update an object's property based on another object's property. The property names must match. A very simple example of what I am trying to achieve would look like this:</p>

<p>Given two objects:</p>

<pre><code>var obj1 = {
   one: "1",
   two: "2",
   three: {
            threeDotOne: "3.1",
            threeDotTwo: "3.2",
            threeDotAny: "3.3"
          }
}

var obj2 = {threeDotAny: "3.4"}
</code></pre>

<p>updateObjectOneProperty(obj1, obj2)</p>

<p>and the result would look like this:</p>

<pre><code>var obj1 = {
   one: "1",
   two: "2",
   three: {
            threeDotOne: "3.1",
            threeDotTwo: "3.2",
            threeDotAny: "3.4"
          }
}
</code></pre>

<p>Here I am assuming that there will only be ONE property with such a name in obj1, which is fine.</p>

<p>Does anyone have any idea on how to do this?</p>
