mrodrig / json-2-csv

Convert JSON to CSV *or* CSV to JSON!
https://mrodrig.github.io/json-2-csv
MIT License
421 stars 58 forks source link

Add support for RegExps in excludeKeys #252

Closed mrodrig closed 8 months ago

mrodrig commented 8 months ago

Background Information

This came up as a nice feature to have in #247 and entails being able to all keys with a particular name regardless of where they appear in the data. For example, to exclude all keys with the name __typename in the generated CSV, without needing to pass all possible key paths to the excludeKeys option.

By adding support for RegExps in the excludeKeys option, users have more control over the specific behavior of which keys are included in the generated CSV.