
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
© ,Kailash Yogeshwar, Licensed under MIT-License
Npm module to convert your CSV file to JSON file with custom options to specify file name and identation level to be use in Json file.
npm install csv-2-json --save
/*
with default options
sample.csv
name, age, score
Kailash, 24, 36
Rajesh, 26, 40
Ajinkya, 33, 49
*/
var csvtojson = require('csv-2-json');
csvtojson.toJson('./sample.csv')
/*
[
{
"name": "kailash",
"age": "24",
"score": "36"
},
{
"name": "Rajesh",
"age": "26",
"score": "50"
},
{
"name": "Ajinkya",
"age": "30",
"score": "54"
}
]
*/
/*
name, age, score
kailash, 24, 36
Rajesh, 26, 50
Ajinkya, 30, 54
*/
var csvtojson = require('csv-2-json');
var options = {
'filename':'report.json',
'indent': 4
}
csvtojson.toJson('./sample.csv',options);
/*
[
{
"name": "kailash",
"age": "24",
"score": "36"
},
{
"name": "Rajesh",
"age": "26",
"score": "50"
},
{
"name": "Ajinkya",
"age": "30",
"score": "54"
}
]
*/
/*
Sample Data
name age score
Kailash 24 36
Rajesh 26 50
Ajinkya 30 54
*/
var csvjson = require('csv-2-json');
var options = {
filename: "result.json",
indent: 4,
delimiter: "\t"
}
csvjson.toJson('./sample.csv',options);
/*
Result
[
{
"name": "kailash",
"age": "24",
"score": "36"
},
{
"name": "Rajesh",
"age": "26",
"score": "50"
},
{
"name": "Ajinkya",
"age": "30",
"score": "54"
}
]
*/
FAQs
Utility module for parsing csv data to json and saving it to file
The npm package csv-2-json receives a total of 69 weekly downloads. As such, csv-2-json popularity was classified as not popular.
We found that csv-2-json demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.