Socket
Book a DemoInstallSign in
Socket

converter-csv-to-json

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

converter-csv-to-json

- First row of your CSV file must contain all the titles of related columns. - Selector is your input tag id

1.2.1
latest
npmnpm
Version published
Weekly downloads
5
400%
Maintainers
1
Weekly downloads
 
Created
Source

converter-csv-to-json

Special Note:

  • First row of your CSV file must contain all the titles of related columns.
  • Selector is your input tag id
<input type="file" id="my-id"/>
import {csvtojson} from "converter-csv-to-json";

async function convertToJson(){
	
	let jsonData = await csvtojson({
	"selector": "my-id",
	"delimiter": ","
	});

	console.log(josnData);
}

// Result

{
     "data":[{
		"name" : "your name",
		"address" : "your address",
		"contact" : "1234567890"
	},{
		"name" : "your name 1",
		"address" : "your address 1",
		"contact" : "1234567890"
	}]
}

Keywords

csvtojson

FAQs

Package last updated on 21 Mar 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

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.