Skip to content
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

renamedHeaders not showing in meta #1024

Open
dasveloper opened this issue Sep 30, 2023 · 4 comments
Open

renamedHeaders not showing in meta #1024

dasveloper opened this issue Sep 30, 2023 · 4 comments

Comments

@dasveloper
Copy link

dasveloper commented Sep 30, 2023

Using 5.4.1 (or you can view in the demo page). When setting { header: true } in the config and having duplicate headers in your data, the headers are renamed correctly but the renamedHeaders meta are not being returned. The docs say "Renamed fields with original (or transformed by transformHeader) are stored in ParseResult.meta.renamedHeaders".

Screenshot 2023-09-30 at 9 25 06 AM Screenshot 2023-09-30 at 9 25 22 AM

Code to replicate:

import Papa from "papaparse";

var data = Papa.parse(
  `Column,Column
1-1,1-2
2-1,2-2
3-1,3-2`,
  { header: true }
);

console.log(data);
@jchen042
Copy link
Contributor

jchen042 commented Nov 6, 2023

@dasveloper - thanks for raising this issue. I contributed to this new field. As you might see the latest released version 5.4.1 source code, the code change hasn't been released yet. However, the document has been updated for some reasons.

@mholt @pokoli can you kindly make another release on current master branch so this field renamedHeaders will benefit more people? Also, it will align with the document update.

@wuzzeb
Copy link

wuzzeb commented Nov 8, 2023

When this gets released, there should be a corresponding pull request to the @types/papaparse package adding this new field: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/papaparse/index.d.ts#L433

@jchen042
Copy link
Contributor

@mholt @pokoli - circling back to see any updates here. Would appreciate your response. 🙏

@pshbot
Copy link

pshbot commented Apr 26, 2024

Sorry to bump this again @jchen042 @mholt @pokoli, but this issue appears to just be waiting on pushing a new release... 😟

@mholt @pokoli can you kindly make another release on current master branch so this field renamedHeaders will benefit more people? Also, it will align with the document update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants