Please see my below code.

```
graph_data = 30,, [.00, 3.20],, 'Driving',,10,, [3.20, 5.17],,'Off-Duty';

var numbersArray = graph_data.split(',,');
var sritems = [];

for(var i=0;i<numbersArray.length;i++){
    var j = i;
    var k = j+1;
    var m = k+1;

    sritems.push({
      "x" : numbersArray[j],
      "y" : numbersArray[k],
      "label" : numbersArray[m]
    });
          i=m;
}

```

I want result like below.

```
{x: 30, y:[.00, 3.20], label: "Driving"},{x: 10, y:[3.20, 5.17], label: "Off-Duty"}

```

I can able to set graph\_data variable value as per requirement.