Skip to content

How to get the column headers? #436

@Thomas-1985

Description

@Thomas-1985

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

const data = file.data;
    const parseResult = parse(data, {
      cast: true,
      columns: true,
      skip_empty_lines: true,
      trim: true,
      info: true,
      delimiter
    } as Options);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions