Function()zTreeObj.getNodes

Overview[ depends on jquery.ztree.core js ]

Get all of the nodes in zTree

Please use zTree object to executing the method.

Function Parameter Descriptions

Return Array(JSON)

return all of the nodes

1. This array is a collection of the root nodes (the default child nodes are in the 'children' attributes);

2. Traverse all the nodes need to use recursion, or the use of transformToArray() method make the nodes to be a simple array.

3. For the asynchronous loading mode, can't get the nodes which are yet loaded.

Examples of function

1. Get all of the nodes

var treeObj = $.fn.zTree.getZTreeObj("tree");
var nodes = treeObj.getNodes();