I want to generate a treeview from a json, but I need to fill. “attr or .date” in the nodes of treeview how to do?
data = [{
"text": "Item 1",
"attr": {
"id": 12145646541 "class": "folder"
}
}, {
"text": "Item 2",
"nodes": [{
"text": "Item 2.1"
}, {
"text": "Item 2.2"
}, {
"text": "Item 2.3"
}]
}, {
"text": "Item 3"
}, {
"text": "Item 4"
}]
$("#ul_menu").wijtree({
nodes: data
});
<ul id="ul_menu"></ul>
Kindly take a look at this blog article which explains about binding a wijtree to an external datasource as an json object: http://wijmo.com/populate-wijtree-from-external-data-source-using-knockout/