TreeTable - Lost data after calling webix.ui

Hi all,

this is a sample structure of my dataset for TreeTable:

var dataTo = 
[
    {id:"1", Month:"2016", Value:410, "open": true, data:
        [
            {id:"1.1",Month: "Jan", Value: 100},
            {id:"1.2",Month: "Feb", Value: 110},
            {id:"1.3",Month: "Mar", Value: 200},
            {id:"1.4",Month: "Mar", Value: 200}
        ]
    },
    {id:"2", Month:"2017", Value:410, "open": true, data:
        [
            {id:"2.1",Month: "Jan", Value: 100},
            {id:"2.2",Month: "Feb", Value: 110},
            {id:"2.3",Month: "Mar", Value: 200}
        ]
    },
];

I want to iterate through the data-arrays of the different dataTo-Objects. For example dataTo[0].data

But after drawing the TreeTable (calling webix.ui({…}) ), the data-arrays aren’t exisiting in my JSON-object.
Does webix.ui delete the data-arrays from JSON-Object after rendering?

Regards
Thomas

It’s a normal behavior, as the data object will be adapted for the treetable. To preserve the original array, you need to use the webix.copy() as follows:

http://webix.com/snippet/1dd04fdb

This approach is required especially if you plan to populate the same dataset for several independent components.

If you need to manipulate the data in the treetable, please check the related docs, the ui.treetable and Treestore API.