Generating a map rather than an object?
mbostock opened this issue · 1 comments
mbostock commented
What if a column is named __proto__
?
mbostock commented
This seems quite unlikely in practice and not worth worrying about—and besides, you can always use parseRows and create a map yourself. Something like:
var columns, data = d3_dsv.csv.parseRows(text, function(row, i) {
if (i) {
var m = d3_array.map();
columns.forEach(function(c, i) { m.set(c, row[i]); });
return m;
} else {
columns = row;
}
});