Finds an object in a tree structure by its name.

Return

The first object with the matching name, or null if no object is found.

Parameters

root

The root node of the tree.

name

The name of the object to search for.