serialize of ui.tree, Methods Webix Docs

booleandefines whether all data or only the filtered data are serialized
arrayserialized data as an array of JSON objects

Example

$$("tree1").serialize();

Details

By default, the whole tree data are serialized. If you want to serialize a particular branch, pass the ID of the branch to the method:

const branch_data = $$("tree1").serialize("branchId");

By default, only filtered data are serialized. If you want to serialize all data regardless of previous filtering, pass true as the second parameter:

$$("tree1").filter(function(obj){
  return obj.value.indexOf("IMG") !== -1;
});
const allData = $$("tree1").serialize(null,true);

Back to top