You need to use JSON.parse();
it transforms your string into an array.
var jsonStr="[{"y": 0.0, "x": 0.0}, {"y": 5.0, "x": 5.0}]";
var array=JSON.parse(jsonStr);
console.log(array[0].x,array[1].x);
array
contains everything you need.
array[0]
is the first set of values.
array[0].x
is the first x value.
DEMO
1
solved I was wondering if a JavaScript programmer could help me write a javascript function to extract the x-y points from a JSON string [closed]