0
我正在使用jqtree插件来生成树视图。 现在我想通过标签为每个节点排序树。Jqtree - 排序entrys
该插件没有排序功能,所以我认为我需要在将数据加载到它之前进行排序。
这是我的数据进行排序。
[
{
"label": "A label",
"id": "201",
"children": [
{
"label": "C Label",
"id": "40773",
"children": [
{
"label": "F label",
"id": "222460",
"children": []
},
{
"label": "C label",
"id": "222469",
"children": []
},
{
"label": "X label",
"id": "27512",
"children": [
{
"label": "F label",
"id": "143546",
"children": []
},
{
"label": "D label",
"id": "141341",
"children": [
{
"label": "G label",
"id": "222456",
"children": []
},
{
"label": "L label",
"id": "222457",
"children": []
},
{
"label": "x label",
"id": "222443",
"children": [
{
"label": "Z label",
"id": "222447",
"children": []
},
{
"label": "A label",
"id": "222446",
"children": []
}
]
},
{
"label": "L label",
"id": "222455",
"children": []
}
]
},
{
"label": "A label",
"id": "143547",
"children": [
{
"label": "B label",
"id": "222458",
"children": []
}
]
},
{
"label": "R label",
"id": "143548",
"children": []
}
]
}
]
}
]
}
]
非常感谢您的任何建议。
谢谢 - 这是我需要的 – 2014-11-07 08:06:39