NOT
returns the logical opposite of the argument it is passed.
Function category: Logical​
NOT(arg1)
Arguments | Description |
| Expression that can be interpreted as true or false (including numbers, strings, and arrays etc.) |
Let's say we're given a response with the following fleet deployment information:
{"data":{"fleet_ready":{"fleet_1": false}}}
If we want to transform the return value in the first example into it's opposite value, use the following function.
# Transform a value into its oppositeNOT(data.fleet_ready.fleet_1)​# Returns true
Let's say the API doesn't respond with a Boolean value but provides a string, as in the following.
{"data_2":{"fleet_ready":{"fleet_1": "not ready"}}}
Since strings are interpreted as true, we can transform "not ready"
in "false"
using the following function.
# Transform a string to falseNOT(data_2.fleet_ready.fleet_1)​# Returns false