I have a result of the following code
d3.csv("../hello.csv", function(data) {
console.log(data);
var usable = data.map(function (d) {
return {
description: d.description.split(" ")
};
});
console.log(usable);
});
the console log of the usable is [object, object, object] when I expand it is
0:Object
description: Array[3]
0 : "A"
1 : "B"
2 : "C"
1:Object
description: Array[3]
0 : "D"
1 : "E"
2 : "FG"
2:Object
description: Array[5]
0 : "AD"
1 : "BD"
2 : "DC"
4 : "HH"
What I need is single array as follows:
[A,B,C,D,E,FG,AD,BD,DC,HH]
with all elements reduced to single array rather than having multiple.
How can I achieve this? Any help would be highly appreciated.