title: How to create a Jquery array object
body: <p>I have to pass values to highChart in following format</p>
  
  <pre><code>data: [
       ['Firefox',   45.0],
       ['IE',       26.8],
  ]
  </code></pre>
  
  <p>I have the values in a table something like this </p>
  
  <pre><code>&lt;table&gt;
      &lt;tr&gt;
          &lt;th colspan="2"&gt;
              &lt;div align="left"&gt;Expenditure in, or on behalf of, Scotland &lt;/div&gt;            
          &lt;/th&gt;
      &lt;/tr&gt;
      &lt;tr class="row"&gt;
          &lt;td&gt;Public sector debt interest&lt;/td&gt;
          &lt;td&gt;&lt;?php echo $x ?&gt;&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr class="row"&gt;
          &lt;td&gt;Public sector debt interest&lt;/td&gt;
          &lt;td&gt;&lt;?php echo $x ?&gt;&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>I trying to create array from the table like this but its not working</p>
  
  <pre><code>$('.row').each(function (i) {
      var data = [];
      $(this).find('td').each(function (j, v) {
          if (j == 0)
              var label = $(this).html();
          else {
              var val = $(this).html();
              data[label] = val;
          } 
      });
  });
  </code></pre>
  
  <p>Can any one please help me out where I am doing the mistake</p>
  
  <p>Thanks in advance </p>