问题描述
- json数据转成树结构的问题
-
求大神指导如何在js端把如下json数据改造成一个树结构在网页中显示出来。
json=[{"children":[{"children":[],"ebtype":"传感器模块","ebuuid":"b9d81030","href":"nodeinfo.j?nodeaddr=-17960","hrefTarget":"_self","ieee":"124B000207EABB","leaf":true,"lqi":"33","mbtype":"电源板","nodeaddr":"-17960","nodeaddr1":"47576","panid":"1231","rssi":"-69"}],"ebtype":"传感器模块","ebuuid":null,"href":"nodeinfo.j?nodeaddr=0","hrefTarget":"_self","ieee":"124B0001A8E7F7","leaf":false,"lqi":"0","mbtype":"智能板","nodeaddr":"0","nodeaddr1":"0","panid":"1231","rssi":"0"}]
解决方案
spring 返回 JSON乱码问题的解决 及个人 动态加载ztree树结构的json数据代码
http://www.educity.cn/wenda/69579.html
解决方案三:
可以使用ztree,准备好id,pid,name就行了,,
时间: 2024-10-03 12:04:39