Imagine having a tree structure in JavaScript like this:
a1
--b
----c1
a2
--b2
--b3
----c2
If you needed to find c2, the path would be a2->b3->c2
Now, consider the following JSON object representing a family tree:
treeFamily = {
name : "Parent",
children: [{
name : "Child1",
children: [{
name : "Grandchild1",
children: []
},{
name : "Grandchild2",
children: []
},{
name : "Grandchild3",
children: []
}]
}, {
name: "Child2",
children: []
}]
};