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