So I'm trying to parse a csv file using papaparse in Meteor, the following is the code:
var csv = Assets.getText('test.csv');
Papa.parse(csv, {
header:true,
complete: function(results) {
results.data.forEach(row){
}
console.log(results);
}
});
It's giving me an unexpected token, expected ";"
error on the results.data.forEach(row){
line. If I put for example var testword = 'x';
inside the brackets I get the same error. I was trying to loop through each row but I'm not sure why It's not letting me do so. Any ideas?