A function to easily generate csv downloads of your json data. ✨
https://json-to-csv-export.coston.io
- Create a csv download from json data
- Lightweight
- Easy to use
- optional filename
Install with npm:
npm i json-to-csv-exportOr load from a CDN:
<script src="https://cdn.jsdelivr.net/npm/json-to-csv-export"></script>import csvDownload from 'json-to-csv-export'
...
  <button onClick={() => csvDownload(mockData)}>
    Download Data
  </button>| # | Argument | Type | Requirement | Default | Description | 
|---|---|---|---|---|---|
| 1 | data | object | required | null | object or array of objects | 
| 2 | filename | string | optional | "export.csv" | The complete filename | 
| 3 | delimiter | string | optional | "," | field separator | 
Please help provide good data faster! Submit any issues and/or make a pull request!