I'm just getting started with PapaParse, so sorry if this is a silly question.
If I parse a file, I get my nice results object, I can look at the headers, and all that:
Papa.parse(file, {
header: true,
dynamicTyping: true,
complete: function(results) {
console.log("done");
data = results;
//headers = split(data[0]);
headers = results.meta['fields'];
However, if I add in a step callback, the results object in complete step is not defined. What am I actually supposed to do in the step callback? Their examples just dump the output of each row to the console.
Papa.parse(file, {
header: true,
dynamicTyping: true,
step: function(row) {
//console.log(row.data);
data.push(row.data);
},
complete: function(results) {
console.log("done");
data = results;
//headers = split(data[0]);
headers = results.meta['fields'];