树形结构返回的信息如下。选中时会对应生成 "state": {"selected" : true},现在我想获取选中时对应的id以及父级的id。怎么优雅的解决呢??[ { "id": "514600710075631001", "text": "医院管理", "state": { "selected": true }, "children": [ { "id": "514600710075631106", "text": "职称管理", "state": { "selected": true }, "children": [ { "id": "514600710075631151", "text": "职称列表" } ] }, { "id": "514600710075631102", "text": "科室管理", "children": [ { "id": "514600710075631121", "text": "科室列表" } ] } ] }]类似于Demo http://css-tricks.com/example...
添加回答
举报
0/150
提交
取消