score:1

Accepted answer

If you already have the string, you can just split it like this:

var a = "1,2,3"
var b = a.split(",")
console.log(b[1])

Specifically, for your example, you can extract the data like this:

var data = jslines.map(function(l) {
  data = l.split(",");
  return({time: data[0], rx: data[1], tx: data[2]});
})

And then construct your d3 plot based on the resulting array of objects.


Related Query

More Query from same tag