jsTree插件能否接受JSON对象的映射作为对树的输入?
我们知道jsTree requires the following format of JSON input:
[
{ "id" : "01", "parent" : "#", "node1" : "Simple node" },
{ "id" : "02", "parent" : "#", "node2" : "node 2" }
]
但是可以将JSON映射提供给树:
[
"01": { "id" : "01", "parent" : "#", "node1" : "Simple node" },
"02": { "id" : "02", "parent" : "#", "node2" : "node 2" }
]
其中键是节点ID?