
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
export-json-to-csv
Advanced tools
The JSON to CSV Converter is a lightweight and efficient npm package designed to seamlessly convert JSON data into CSV format. This tool is particularly useful for developers who need to export or manipulate data in CSV format, a widely accepted standard
Converts and exports JSON data to CSV
The JSON to CSV Converter is a lightweight and efficient npm package designed to seamlessly convert JSON data into CSV format. This tool is particularly useful for developers who need to export or manipulate data in CSV format, a widely accepted standard for data interchange.
npm install export-json-to-csv
Below is a simple example of how to use the package:
import { exportCSVFromJSON } from 'export-json-to-csv'
const jsonData = [
{ name: "John Doe", age: 28, city: "New York" },
{ name: "Jane Doe", age: 32, city: "San Francisco" }
];
const options={
data:jsonData,
headers:['Name','Age','City'],
keys:['name','age','city'],
title:'test file data',
fileName:'test-export.csv'
}
exportCSVFromJSON(dataObj)
Parameter | Type | Description | Required | Default |
---|---|---|---|---|
data | Array | The JSON data to be converted into CSV format. Each object in the array represents a row. | Yes | N/A |
headers | Array | Custom headers for the CSV file. If not provided, the keys will be used as headers. | No | All keys in the first object |
keys | Array | An array of keys specifying which fields from the JSON data should be included in the CSV. | No | All keys in the first object |
title | String | An optional title to be included at the top of the CSV file. | No | N/A |
fileName | String | The name of the generated CSV file. | No | export.csv |
We welcome contributions! Feel free to submit issues, feature requests, or pull requests to help improve this package.
FAQs
The JSON to CSV Converter is a lightweight and efficient npm package designed to seamlessly convert JSON data into CSV format. This tool is particularly useful for developers who need to export or manipulate data in CSV format, a widely accepted standard
The npm package export-json-to-csv receives a total of 6 weekly downloads. As such, export-json-to-csv popularity was classified as not popular.
We found that export-json-to-csv demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.