导入JSON到xmind

写在前面

这只是一个思路,解决大量树状数据,创建xmind低效问题。 函数可以根据你的实际情况优化

1. 转换json格式

javascript 复制代码
function formatToXimd(atd, str) {
    if (atd) {
        for (let index = 0; index < atd.length; index++) {
            console.log(str + '- ' + atd[index].name)     
            formatToXimd(atd[index].productArr,`${str}\t`)
            formatToXimd(atd[index].children,`${str}\t`)
        }
    }
}
formatToXimd('你的JSON', `\t`)

2. 保存成md格式文件

控制台得到一个Md格式的列表,保存成.md格式文件

3. xmind导入该文件

Xmind导入该文件,选择MarkDown格式。

注意:检查一下MD列表,应该只有一个根元素,如果格式不对,需要手动修改

相关推荐
wtsolutions1 天前
JSON to Excel Add-in - Seamless Integration Within Excel
json·excel
wtsolutions1 天前
Getting Started with JSON to Excel Web App - Convert in Seconds
json·excel·web app
wtsolutions1 天前
Using the JSON to Excel API - Programmatic Access for Developers
json·excel
wtsolutions1 天前
Understanding JSON Formats - What JSON to Excel Supports
json·excel
wtsolutions1 天前
Advanced Features - Unlocking the Power of JSON to Excel Pro
linux·json·excel
wtsolutions1 天前
Real-World Use Cases - How Organizations Use JSON to Excel
json·excel
wtsolutions1 天前
Introduction to JSON to Excel - The Ultimate Conversion Tool
json·excel
San30.1 天前
LangChain 第二课:拒绝“废话”,用 Zod 强制 AI 输出标准 JSON
人工智能·langchain·json
wtsolutions1 天前
JSON to Excel WPS Add-in - Perfect for WPS Office Users
json·excel·wps
wtsolutions1 天前
Flat vs Nested JSON Conversion - Deep Dive into Conversion Modes
json