javascript array datatable object to string
<p>I have a javascript var like</p>

<pre><code>var data = google.visualization.arrayToDataTable([
      ['Year', 'Sales', 'Expenses'],
      ['2004',  1000,      400],
      ['2005',  1170,      460],
      ['2006',  660,       1120],
      ['2007',  1030,      540]
    ]);
</code></pre>

<p>and i want to pass it to a textarea, i try to get as</p>

<pre><code>JSON.stringfy(data, null, '\t');
</code></pre>

<p>but i got some ugly text ...</p>

<pre><code>"{\"cols\":[{\"id\":\"\",\"label\":\"Year\",\"pattern\":\"\",\"type\":\"string\"},{\"id\":\"\",\"label\":\"Sales\",\"pattern\":\"\",\"type\":\"number\"},{\"id\":\"\",\"label\":\"Expenses\",\"pattern\":\"\",\"type\":\"number\"}],\"rows\":[{\"c\":[{\"v\":\"2004\",\"f\":null},{\"v\":1000,\"f\":null},{\"v\":400,\"f\":null}]},{\"c\":[{\"v\":\"2005\",\"f\":null},{\"v\":1170,\"f\":null},{\"v\":460,\"f\":null}]},{\"c\":[{\"v\":\"2006\",\"f\":null},{\"v\":660,\"f\":null},{\"v\":1120,\"f\":null}]},{\"c\":[{\"v\":\"2007\",\"f\":null},{\"v\":1030,\"f\":null},{\"v\":540,\"f\":null}]}],\"p\":null}"
</code></pre>

<p>im trying to get something like this...</p>

<pre><code>['Year', 'Sales', 'Expenses'],
  ['2004',  1000,      400],
  ['2005',  1170,      460],
  ['2006',  660,       1120],
  ['2007',  1030,      540]
</code></pre>

<p>this is google chart code example.
How can i get it? if i can....</p>
