PapaParse
PapaParse copied to clipboard
renamedHeaders not showing in meta
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".
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);
@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.
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
@mholt @pokoli - circling back to see any updates here. Would appreciate your response. 🙏
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.