## Function(treeNodes)zTreeObj.transformToArray

### Overview[ depends on jquery.ztree.core js ]

Transform the zTree nodes data into simple array. (To avoid the user to write code to traverse all nodes)

Please use zTree object to executing the method.

### Function Parameter Descriptions

#### treeNodesArray(JSON) / JSON

JSON data object of the node which need to be transformed.

or JSON data objects collection of the nodes which need to be transformed.

#### Return Array(JSON)

The JSON data objects array of the nodes which be transformed.

### Examples of function

#### 1. Transform the zTree nodes data into simple array.

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