-
Notifications
You must be signed in to change notification settings - Fork 216
Description
Parsing or Formatting?
- Formatting
- Parsing
Is your feature request related to a problem? Please describe.
When working with objects as rows, the keys are often property keys written in camel case which is not always nice to present to a client.
Describe the solution you'd like
I'd like an option similar we have in 'Parsing' where one could renameHeaders or provide them as transform function
Describe alternatives you've considered
1 Provide headers array and convert row objects to row arrays. This requires maintaining the order within the keys.
2 Rename object keys to the new values. However json keys do not allow for certain symbols and may not be generic enough.
3 format -> parse -> format; this seems as a waste, but technically could solve the issue here.
4. renameHeaders(firstRow) + '\n' + await writeToString(..., {writeHeaders: false}) - or regex based renaming of the first row. order specific, convoluted