我想用bootstrap 中的jstree做一个树 data 中的内容拼接好了json传到前台..
[
{ "id" : "1", "parent" : "#", "text" : "root" },
{ "id" : "2", "parent" : "1", "text" : "child 1" },
{ "id" : "3", "parent" : "1", "text" : "child 2" }
]
可是到了前台转换json的时候数据变成了
[
Object{ "id" : "1", "parent" : "#", "text" : "root" },
Object { "id" : "2", "parent" : "1", "text" : "child 1" },
Object { "id" : "3", "parent" : "1", "text" : "child 2" }
]
这样不符合data对数据的要求.求解怎么把Object去掉