assign a new data to a tree

Hi, how to replace the whole data of a tree with a new array?

tree.clearAll();
tree.parse(data);

If you want to reuse data structure, be sure to use webix.copy

tree.clearAll();
tree.parse(webix.copy(data));

Thank you very much Maksim.