Consider the tree nodes from the image above.
We would like to navigate through the tree and return some data if the node’s conditions is met.
This may be easy when we have static conditions for all nodes(objA == objB for example). But what about dynamic conditions? how can we handle different condition types for each node?.
We may have the following conditions:
NodeA: Object.property > 50
NodeB: Object.property2 === ‘Agree’
NodeC: Object !== undefined
NodeD: Object.property === ‘A’ or Object.property === ‘B’