TreeData
TreeData[tree] extracts the data in the root of the Tree object tree.
Examples
Get root data:
TreeData[Tree[a, {Tree[b, {}], Tree[c, {}]}]]Access nested tree data:
tree = Tree["root", {Tree["child1", {}]}];
TreeData[tree]Please visit the official Wolfram Language Reference for more details.