3 name: functions-loaddata
6 **function loadData(data);**
8 **function loadData(data, parent_node);**
10 Load data in the tree. The data is array of nodes.
12 You can **replace the whole tree** or you can **load a subtree**.
15 // Assuming the tree exists
31 $('#tree1').tree('loadData', new_data);
37 // Get node by id (this assumes that the nodes have an id)
38 var node = $('#tree1').tree('getNodeById', 100);
43 { name: 'another new node' }
45 $('#tree1').tree('loadData', data, node);