Accepted answer

The simplest way if you're in control of the source data is to use a JSON format:

    field: "fieldnameA",
    data: [1,2,3,4...],
    field: "fieldnameA",
    data: [1,2,3,4...],

Then you can load the data. D3 can do this in using d3.json just note that this has been changed in the latest V5 version to return a promise instead.

d3.json("myData.json", function(data){


Related Query

More Query from same tag