Hello I am using papaparse inside my express server and I am trying to parse a csv list and I am getting the following error :
{"data":[],"errors":[],"meta":{"delimiter":",","linebreak":"\n","aborted":false,"truncated":false,"cursor":11,"fields":["my-list.csv"]}}
Why am I seeing this?
// 1. Declare a GET route
contactRouter.route('/contacts')
.get(function(req, res){
var responseJson = parser;
res.send(responseJson);
console.log(responseJson);
});
// 2. Read the CSV file
var data = "my-list.csv";
var parser = Papa.parse(data, {
header: true,
delimiter: ",",
complete: function(results) {
console.log(results);
}
});
It's not an error. It's the result of console.log(responseJson);
.