title: Create array variable
body: <p>I wanted to create this kind of output</p>
  <pre><code>var s1 = [['Sony',7],['Samsung',5],['LG',8]];
  </code></pre>
  <p>so that I could use it to pass on my graph as a variable</p>
  <p>out from the result of my ajax</p>
  <pre><code>success: function(data){
  
      //code to extract the data value here
  
      var s1= need to create the data here
  
      $.jqplot('chart',[s1],{ blah blah blah
  
  }
  </code></pre>
  <p>&quot;data&quot; in the success function returns this table layout</p>
  <pre><code>&lt;table id=&quot;tblResult&quot;&gt;
      &lt;tr class=&quot;tblRows&quot;&gt;
          &lt;td class=&quot;clsPhone&quot;&gt;Sony&lt;/td&gt;&lt;td class=&quot;clsRating&quot;&gt;7&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr class=&quot;tblRows&quot;&gt;
          &lt;td class=&quot;clsPhone&quot;&gt;Samsung&lt;/td&gt;&lt;td class=&quot;clsRating&quot;&gt;5&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr class=&quot;tblRows&quot;&gt;
          &lt;td class=&quot;clsPhone&quot;&gt;LG&lt;/td&gt;&lt;td class=&quot;clsRating&quot;&gt;8&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  <p>can you please help me create the logic for this?</p>
  <p>Thanks in advance</p>
  <p><strong>EDIT:</strong>
  I'm looking for a solution something like the following:</p>
  <pre><code>var s1;
  $(&quot;.tblRows&quot;).each(function(){
      // here I don't know exactly on what to do
      //s1.push($(&quot;.clsPhone&quot;).text(),$(&quot;.clsRating&quot;).text()));
  });
  // all I wanted is to make the resul s1=[['Sony',7],['Samsung',5],['LG',8]];
  </code></pre>
  <p>because jqplot requires this kind of parameter</p>
  <pre><code>s1=[['Sony',7],['Samsung',5],['LG',8]];
  $.jqplot('chart',[s1],{
          renderer:$.jqplot.PieRenderer,
          rendererOptions:{
              showDataLabels:true,
              dataLabelThreshold:1
          }
      }
  });
  </code></pre>
  <p>so I'm looking for a way to create a the value for the variable s1 out from the data
  could this be possible?</p>