Skip to content

dsh-json-csv

Verified

dsh-json-csv · v0.1.0 · MIT

CSV ↔ JSON 转换:JSON 对象数组转 CSV,CSV 解析为 JSON

Install

dsh plugin add dsh-json-csv

Confirm the layer applied with dsh --profile default --dump-config — see the install guide.

Source

Published to npm without a public repository. Inspect the package contents before installing.

Tags

Readme

dsh-json-csv · CSV ↔ JSON 转换

JSON 对象数组 ↔ CSV 互转,支持表头与引号转义。纯 Node 实现。

提供的工具

工具 作用
json_to_csv JSON 数组 → CSV
csv_to_json CSV → JSON 数组

安装

dsh plugin add dsh-json-csv

安装后在 profile 的 package.jsondsh.profile.bundles 中加入 "dsh-json-csv"

用法示例

把这组数据导出成 CSV
→ 调用 json_to_csv(data=[{a:1,b:2},{a:3,b:4}])