title: Convert JSON string to an array in JavaScript
body: <p>I'm using <a href="http://www.jqplot.com/" rel="nofollow">jqPlot</a> to create a chart. The data points for the chart come from a JSON object which is built using GSON. The chart data points are built in a JavaScript array format, so the Java object that holds the data to send to the client stores the data as follows: </p>
  
  <pre><code>String chartDataPoints = "[[1352128861000, 0.0], [1352128801000, 0.0], [1352128741000,   0.0], [1352128681000, 0.0], [1352128621000, 0.0],...More chart points in this format ,[[x0,y0], [x1,y2]...]]";
  </code></pre>
  
  <p>The x points are dates.</p>
  
  <p>Is it possible to pass this data straight from the JSON object as though it is a JavaScript array? Currently MyJsonObject.chartDataPoints is treated as a String, and so jqPlot ($.jqplot ('chart1', MyJsonObject.chartDataPoints) doesn't plot anything.</p>