Overview of json-2-csv functionality
mainThe json-2-csv module provides bidirectional conversion between JSON arrays and CSV strings:
- JSON to CSV: Converts an array of JSON documents into a CSV string. Column headings are automatically generated from JSON keys. For nested documents, keys are joined using a
.separator (e.g.,user.name). - CSV to JSON: Converts a CSV string back into an array of JSON documents. The CSV column headings are used as the keys for the resulting JSON objects. Note that all CSV lines must contain the exact same number of values for successful conversion.