tree is not a tree but a list
Be aware that 'tree' doesn't return a tree, matrix of array of arrays but a list.
Making a sort on a 'tree' totaly destroys the tree structure and sort all the listed objects without taking in count there depth or parent node.If you wan't to search by depth and parent, it seems that you can't. No recursive function to step easily through this not-tree-but-list.