node-csvtojson
node-csvtojson copied to clipboard
asynchronous problems
Why this print before the "test" log?
csv({delimiter:[';']}).fromFile("\castelli-campania.csv").then((jsonObj)=>{
jsonObj.forEach(row => {
words.push(row["Provincia"]);
console.log(words.length)
});
})
console.log("test" + words.length)