READMESource: main@1ccb7cfe
dsh-json-flatten · JSON 扁平化
嵌套 JSON ↔ 点号扁平键互转(数组用 [index])。纯 Node 实现。
提供的工具
| 工具 | 作用 |
|---|---|
flatten_json |
嵌套 ↔ 扁平互转 |
安装
dsh plugin add dsh-json-flatten
安装后在 profile 的 package.json 的 dsh.profile.bundles 中加入 "dsh-json-flatten"。
用法示例
把这个嵌套 JSON 展平
→ 调用 flatten_json(data={a:{b:1,c:[2,3]}})
No comments yet. Be the first to write one.