Deleting nested property in javascript object
<p>I have a JS object like this:</p>

<pre><code>var tenants = {
    'first': {
        'name': 'first',
        'expired': 1
    },
    'second': {
        'name': 'second'
    }
}
</code></pre>

<p>And I'd like to delete the 'expired' property of tenant 'first', should I just do this?</p>

<pre><code>delete tenants['first']['expired'];
</code></pre>

<p>Note: this question is more specific than the question: <a href="https://stackoverflow.com/questions/208105/how-to-remove-a-property-from-a-javascript-object">How do I remove a property from a JavaScript object?</a>, in that my question focuses on the 'nested' part.</p>