Conditional expressions

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

$cond

The $cond phrase will evaluate an expression of the format if...then...else, and depending on the result of the if statement, it will return the value of the then statement or else branches. The input can be either three named parameters or three expressions in an ordered list:

$ifNull

The $ifNull phrase will evaluate an expression and return the first expression if it is not null or the second expression if the first expression is null. Null can be either a missing field or a field with an undefined value: 

$switch

Similar to a programming language's switch statement, $switch will execute a specified expression when it evaluates to true, 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