Applies predicate to root and all its child nodes, returning the node value for predicate yields true. Use find to filter by nodes rather than values
predicate
root
const n = findByValue(root, (v) => v.name === 'Bob'); Copy
const n = findByValue(root, (v) => v.name === 'Bob');
Iterate children by breadth or depth. Default 'breadth'
Applies
predicatetorootand all its child nodes, returning the node value forpredicateyields true. Use find to filter by nodes rather than values