@jarisma/json2csv
v1.0.1
Published
Convert JSON file to CVS
Downloads
1
Readme
Installation
npm install @jarisma/json2csv
Usage examples
引入 index.js
:
import JSON2CVS from "@jaris/json2csv";
const jsonData = [
{
name: '姓名',
phone: '手机',
email: '邮箱'
},
{
name: '甲',
phone: '00000000000',
email: '[email protected]'
},
{
name: '乙',
phone: '00000000000',
email: '[email protected]'
},
{
name: '丙',
phone: '00000000000',
email: '[email protected]'
},
{
name: '丁',
phone: '00000000000',
email: '[email protected]'
}
];
const cvs = new JSON2CVS(jsonData); // 初始化数据
cvs.toCVS(); // 导出cvs文件