Expression comparison operators

Comparison operators can be used in conjunction with Boolean operators to construct the expressions that we need to evaluate as true/false for the output of our pipeline's stage.

The most commonly used operators are as follows:

  • $eq ( equal )
  • $ne ( not equal)
  • $gt (greater than)
  • $gte (greater than or equal)
  • $lt
  • $lte

All the aforementioned mentioned operators return a Boolean value of true or false.

The only operator that doesn't return a Boolean value is $cmp, which returns 0 if the two arguments are equivalent, 1 if the first value is greater than the second and -1 if the second value is greater than the first.

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

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