Conditional expressions

Expressions can be used to output different data to the next stage in our pipeline, based on Boolean truth tests.

$cond

This is a ternary operator that evaluates one expression, and depending on the result, returns the value of one of the other two expressions. It accepts either three expressions in an ordered list or three named parameters.

$ifNull

This returns either the non-null result of the first expression or the result of the second expression if the first expression results in a null result. Null result encompasses instances of undefined values or missing fields. It accepts two expressions as arguments. The result of the second expression can be null.

$switch

This evaluates a series of case expressions. When it finds an expression that evaluates to true, $switch executes a specified expression and breaks out of the control flow.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.51.157