title: How to create a Javascript object with index and values with variables?
body: <p>I have a problem in my javascript code, i need to create an object with variables and those variables being objects too. Explanation:</p>
  
  <p>I need this in my javascript code (similar to a Json structure):</p>
  
  <pre><code>var myObj = {
     variableOne: {
               variableOneA: 'someValue',
               variableOneB: 'someValue'
           }
     variableTwo: {
               variableTwoA: 'someValue',
               variableTwoB: 'someValue'
           }
     variableThree: {
               variableThreeA: 'someValue',
               variableThreeB: 'someValue'
           }
   }
  </code></pre>
  
  <p>Now, my problem with this is that in Js i cannot do a 'push' method to an object and i can only add one level of variables to my object doing this:</p>
  
  <pre><code>myObj.variableOne = 'someValue';
  </code></pre>
  
  <p>Can anyone help me please? i believe the resolution could be easy but i am new to Js.</p>