Upon running the code below, I received the following results:
d3.csv("../hello.csv", function(data) {
console.log(data);
var usable = data.map(function (d) {
return {
description: d.description.split(" ")
};
});
console.log(usable);
});
After checking the console log, I found that the usable output is [object, object, object]
. Upon expanding it, I saw the following:
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"
My goal is to combine all these elements into a single array as shown below:
[A,B,C,D,E,FG,AD,BD,DC,HH]
I am looking for assistance on how to achieve this. Any guidance would be greatly appreciated.