recently encountered a requirement that the data structure is a tree structure.
is when I click on a child node and need to get an attribute value for all nodes of the corresponding branch. The data structure is shown in the following figure.
for example, I click E to get the level and information of E. How do I get information about the corresponding branches (B and A) at the same time? Ask the great god for advice.