Create nested property from variable
<p>Assume I have an empty object like so:</p>

<pre><code>var object = {};
</code></pre>

<p>How can I add a property with a nested object using variables?  E.g.:</p>

<pre><code>&lt;span id='obj1'&gt;person&lt;/span&gt;
&lt;span id='nestedObj'&gt;name&lt;/span&gt;

var obj1 = $( '#obj1' ).text();
var nestedObj = $( '#nestedObj' ).text();
function (obj1, nestedObj) {
    //Trying to simulate object.person.nestedObj
    object[obj1][nestedObj] = 'someone';
}
</code></pre>
