Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

easy-json-to-csv-converter

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

easy-json-to-csv-converter

Exports a structured JSON array/object to CSV file

  • 1.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
329
increased by57.42%
Maintainers
1
Weekly downloads
 
Created
Source

Easy-JSON-To-CSV-Converter

Exports a structured JSON array/object to CSV file

Installation

npm i easy-json-to-csv-converter

Usage

import {ConvertJSONtoCSV} from "easy-json-to-csv-converter";

    let jsonArray = [{ name: "memona", lastName: "sultan" }];
    let fileName = "myNameFile";

    // 1 for as it is name; 2 for name with dateTime appended
    let fileNameMode = 1; 

    // true = file will have a header , false = file will not have a header
    let showLabels = true;


    // if you want to change the column names you have to map them 
    let mappedColumns = [
      { key: "name", value: "First Name" },
      { key: "lastName", value: "Last Name" }
    ];


    // this method will download a csv file
   ConvertJSONtoCSV(jsonArray, fileName, fileNameMode, showLabels,mappedColumns );

Keywords

FAQs

Package last updated on 26 Sep 2019

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc