Creating a 2D array for JQuery
<p>I have an array that i want to include when creating a 2D array:</p>

<pre><code>var v=[22,34,13,13];
var dataV = new Array();

for(var i=0; i&lt;4; i++) 
  dataV = [i,v[i]];

console.log(dataV);
</code></pre>

<p>Output should be:</p>

<pre><code>[[0, 22],
[1, 34],
[2, 13],
[3, 13]]
</code></pre>

<p>I am using this array with JQuery charts. However the chart seems to only show the last value (13).
Anyone know if i am not converting my array properly.</p>
