Update node data. Primarily used to update the node's DOM.
1. Can update the attributes for display (e.g. 'name', 'target', 'url', 'icon', 'iconSkin', 'checked', 'nocheck'), do not update the other attributes. For example: If you need to expand the node, please use expandNode() method, do not modify the 'open' attribute.
2. Use updateNode() method of zTree can't trigger 'beforeCheck' or 'onCheck' callback function.
Please use zTree object to executing the method.
JSON data object of the node which need to update.
Please ensure that this data object is an internal node data object in zTree.
checkTypeFlag = true means: According to 'setting.check.chkboxType' attribute automatically check or uncheck the parent and child nodes.
checkTypeFlag = false means: only check or uncheck this node, don't affect its parent and child nodes.
This parameter is valid when 'setting.check.enable = true' and 'setting.check.chkStyle = "checkbox"'
Don't affect the parent and child nodes which 'nochecked' attribute is true.
no return value
var treeObj = $.fn.zTree.getZTreeObj("tree");
var nodes = treeObj.getNodes();
if (nodes.length>0) {
nodes[0].name = "test";
treeObj.updateNode(nodes[0]);
}