Skip to content

Custom sorting of headers #216

Closed
Closed
@mebibou

Description

@mebibou

Background Information

  • Module Version: 3.14.4
  • Node/Browser Version: 12.22.6

The issue I'm reporting is with:

  • json2csv
  • csv2json

I have...

  • searched to see if an issue has already been reported.
  • verified that my JSON/CSV data is valid (using something like http://jsonlint.com or https://csvlint.io/).
  • tried upgrading to the latest version of json-2-csv (since the issue may already be fixed).

It would be useful to be able to use a function rather than just a boolean for the sortHeader option. So it would look like

{
  sortHeader: (a, b) => 1
}

So like a typical javascript sort function

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions