var x = JSON.parse("[[0.01,4.99,0.01],[5,14.95,0.05]]");
Or the way jQuery handles JSON (better than eval ):
var x = (new Function("return " + "[[0.01,4.99,0.01],[5,14.95,0.05]]"))();
To complete this answer, you can use polyfill for older browsers to support JSON.parse and JSON.stringify . I recommend json3 because Crockfords json2 is owned by crockfordy (insiders know what I mean).
source share