Operators let you work with static or dynamic variables in more advanced ways. They allow you to combine or modify dynamic variables by applying operators or literals to them, making them especially useful for creating more complex workflows.
{{}}
, as seen in the following example.
This example demonstrates the use of the array[:]
slice function with a step dynamic variable. It extracts elements from the step output starting from index 2 (inclusive), to index 4 (exclusive). So, it retrieves the elements at indices 2 and 3.
"hello"
, 'hello'
)103
, 2.5
, .5
[1, 2, 3]
{foo: "bar"}
true
and false
nil
.
syntax.
If you pass an array into an expression, use the []
syntax to access array keys.
()
syntax. The .
syntax can also be used to call methods on an struct.
+
(addition)-
(subtraction)*
(multiplication)/
(division)%
(modulus)**
(pow)==
(equal)!=
(not equal)<
(less than)>
(greater than)<=
(less than or equal to)>=
(greater than or equal to)not
or !
and
or &&
or
or ||
+
(concatenation)matches
(regex match)contains
(string contains)startsWith
(has prefix)endsWith
(has suffix)not
operator in combination with the matches
operator:
not
has precedence over the binary operator matches
.
Example:
Arthur Dent
.
in
(contain)not in
(does not contain)foo ? 'yes' : 'no'
len
(length of array, map or string)all
(will return true
if all element satisfies the predicate)none
(will return true
if all element does NOT satisfies the predicate)any
(will return true
if any element satisfies the predicate)one
(will return true
if exactly ONE element satisfies the predicate)filter
(filter array by the predicate)map
(map all items with the closure)count
(returns number of elements what satisfies the predicate){...}
(closure)#
symbol.
#
symbol (#.Value
becomes .Value
).
array[:]
(slice)array
is [1,2,3,4,5]
.