title: How to create an array dynamically in a specified manner
body: <p>I have multiple values coming from a database, it increases as new record is added.</p>
  
  <p>I'm making span like this:</p>
  
  <pre><code>&lt;span style="display:none;" class="skills"  data-skill="php programing"&gt;350&lt;/span&gt;
  
  &lt;span style="display:none;" class="skills"  data-skill="java programing"&gt;235&lt;/span&gt;
  
  &lt;span style="display:none;" class="skills"  data-skill="python programing"&gt;289&lt;/span&gt;
  </code></pre>
  
  <p>I want to construct an array in this fashion </p>
  
  <pre><code>var data = google.visualization.arrayToDataTable([
            ['jobs', 'Jobs Available'],
            ['php programing',     350],
            ['java programing',     235],
            ['python programing',  289]
          ]);
  </code></pre>
  
  <p>so that I can be able to construct a google piechart dynamically</p>
  
  <p>right now I am doing something like this</p>
  
  <pre><code>arrayToDataTable = [];
  arrayTemp = [];
  $.each('.skills',function(i){
   var skill = $(this).data('skill');
   var number = $(this).text();
    arrayTemp.push(skill);
    arrayTemp.push(number);
    arrayToDataTable.push(arrayTemp);
  });
  
  
  **my question how can i make array in this fashion dynamically:**
  
       [
            ['jobs', 'Jobs Available'],
            ['php programing',     350],
            ['java programing',     235],
            ['python programing',  289]
         ]
  </code></pre>
  
  <p>please help me thanks in advance</p>