react-papaparse is the fastest in-browser CSV (or delimited text) parser for React. It is full of useful features such as CSVReader, CSVDownloader, readString, jsonToCSV, readRemoteFile, ... etc.
When parsing a simple file with the header option set to true, the onFileLoad callback receives a result that looks like an array of Papaparse result objects:
[
{ data : {header: "val", header2: "val2"},
errors :[],
meta : { ...data}
},
{ data : {header: "val3", header2: "val4"},
errors :[],
meta : { ...data}
},
{ data : {header: "val5", header2: "val6"},
errors :[],
meta : { ...data}
},
]
When the same string is called with Papaparse directly (in a unittest), it comes back as a Result object with an array of rows in the Data field:
Hello,
When parsing a simple file with the header option set to true, the onFileLoad callback receives a result that looks like an array of Papaparse result objects:
When the same string is called with Papaparse directly (in a unittest), it comes back as a Result object with an array of rows in the Data field:
Is this intended behaviour? Or am I missing something?
I have an example of the problem here: https://codesandbox.io/s/peaceful-forest-tj6br?file=/src/CsvReader.js