title: Javascript array problem
body: <pre><code>var data = [];
  var id = 23;
  var num = 12;
  var dog_trialset = 15;
  var cat_trialset = 23;
  </code></pre>
  
  <p>problem  from here</p>
  
  <pre><code>data.push({id:{num:num, dog_trialset:dog_trialset, cat_trialset:cat_trialset}});
  </code></pre>
  
  <p>ajax post to php</p>
  
  <pre><code>[data] =&gt; Array
      (
          [0] =&gt; Array
              (
                  [id] =&gt; Array
                      (
                          [num] =&gt; 12
                          [dog_trialset] =&gt; 15
                          [cat_trialset] =&gt; 34
                      )
  
              )
  
      )
  </code></pre>
  
  <p>I want <code>[id] =&gt; Array(...)</code> to <code>[23] =&gt; Array(...)</code>;</p>
  
  <p>Thanks</p>