-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get the column headers? #436
Comments
Please edit your sample, it is expected to contain the data input string as well as the expected result. |
input:
expected output:
|
Using the I assume the header line shall be separated by From my understanding, you could just extract the first line and interpret it as headers, see the "436.js" example: const [headers, ...records] = parse(
dedent`
name;description;price
Image 1;First image;100
Image 2;Second image;200
Image 3;Third image;50
`,
{ delimiter: ";" }
); |
Describe the bug
Version: 5.5.3
I am using the
sync
api to parse a csv file and get the records. I also need the headers (on the first line) for later analysis but they are not present in the records (maybe thats intentional). How do i get these?To Reproduce
I am using the following code for parsing
The text was updated successfully, but these errors were encountered: