title: Easy way to set javascript object multilevel property?
body: <p>I am trying to create a javascript object like </p>
  
  <pre><code>var allUserExpiry={};
  allUserExpiry[aData.userId][aData.courseId][aData.uscId] = aData;
  </code></pre>
  
  <p>But I am getting an error like <code>allUserExpiry[aData.userId]</code> undefined.</p>
  
  <p>Is there a way, whereby I can set multi-level JS-Object keys? or is it important that I should go by doing <code>allUserExpiry[aData.userId]={}</code>, then <code>allUserExpiry[aData.userId][aData.courseId]={}</code> ?</p>
  
  <p>Please let me know if there are any utility functions available for the same.</p>