在树中查找目标节点(深度优先)
Find a target node in the tree (depth-first).
节点类型 / node type
树数组 / tree array
目标值,用于与节点 id 进行比较 / target value to compare with node id
Optional
表示节点 id 的字段名 / field name for node id
自定义相等比较函数 / custom equality function
子节点字段名 / children field name
找到的节点或 null / found node or null
// getTargetFromTree(tree, 5) Copy
// getTargetFromTree(tree, 5)
在树中查找目标节点(深度优先)
Find a target node in the tree (depth-first).