title: Jquery push key with child array
body: <p>I have a main array</p>
  
  <pre><code>var mainArray = new Array();
  </code></pre>
  
  <p>I have a key(id) and sub array with key pairs "foo" and "zulu"</p>
  
  <pre><code>var id = 2;
  var bar = 14;
  var alpha = 88;
  </code></pre>
  
  <p>I want to push this into the main array structured as so</p>
  
  <pre><code>id =&gt; array(
       "foo" =&gt; bar,
       "zulu" =&gt; alpha
  )
  </code></pre>
  
  <p>I tried this but it doesn't add the parent key, only the child array</p>
  
  <pre><code>mainArray.push(id = {
       "foo" : bar,
       "zulu" : alpha,
  });
  </code></pre>