Socket
Book a DemoInstallSign in
Socket

jtocsv

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jtocsv

A small library that will read all the JSON files from the folder, flatten them, and convert them to CSV file

latest
Source
npmnpm
Version
1.0.7
Version published
Maintainers
1
Created
Source

Jtocsv (JSON to CSV parser)

CI

Jtocsv is an npm package that reads the JSON files from a folder path, parses and flattens the data and combines the data in the output CSV file. It provides flexibility through command-line arguments. CSV headers are formed on flattened JSONs keys.

Installation

npm install -g jtocsv

Usage

jtocsv [options]

Command-Line Options

  • path: (Required) Path to the folder containing JSON files (objects or JSON arrays).

  • path: (Required) Path to the output CSV file.

Examples

Read all JSON files and save the parsed data to CSV file:

jtocsv /path/to/jsons /path/to/output.csv

Inline

import { saveJSONSToCSV } from 'jtocsv/parser.js'
await saveJSONSToCSV('json_path', 'csv_path')

Contributing

Contributions are welcome!

Keywords

JSON

FAQs

Package last updated on 24 Oct 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.