后台返回的数据
"data": {
"process": [
"conf.config",
"algorithm.base",
"common.helper.msg_helper",
],
"log_level": [
"INFO",
"ERROR",
]
}
展示成树结构
处理1
let objMap = Object.entries(data)
返回,将父子换为0,1
导航树
objMap.map(item => {
return {
title:item[0],
key:item[0],
children: item[1].map(i => {
return {
title:i || '-',
key: `${item[0]}$Ch%id${i}`,
}
})
}
})