Hi,
I have 3 different object / node as below, and I am
trying to form the finalObj / node which is the union (unique tree list) of the
3 nodes..
Is there a method in tree view with which I can union 3 objects (nodes) based on text or id ?
First node:
[ { text: "TreeRoot", items: [
{ text: "Subgroup1" },
{ text: "Subgroup2" }
]}]
Second Node:
var obj2= [ { text: "TreeRoot", items: [
{ text: "Subgroup3" }
]}]
Third node:
var obj3= [{ text: "Subgroup3",
items: [ {
text: "subgroup5",
items: [ {
text: "subgroup6",
items: [ {
text: "subgroup7",
items: [ {
text: "subgroup8"
}]
}] }]
}]}]
Final expected node:
var finalObj= [ { text: "TreeRoot", items: [
{ text: "Subgroup1" },
{ text: "Subgroup2" },
{ text: "Subgroup3",
items: [ {
text: "subgroup5",
items: [ {
text: "subgroup6",
items: [ {
text: "subgroup7",
items: [ {
text: "subgroup8"
}]
}] }]
}]}]}]