Transform a tree-like structure in-place into a DaffTreeData
.
This will mutate the original object, hydrating with additional properties.
@param tree - The data structure representing tree-like data.
@param transformFn - A user-supplied function that will transform the user
type into a DaffTreeData
@param key - The property of the your tree that indicates which
key contains the "children" of your tree structure.