This repository has been archived by the owner on Oct 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Dan Gorman edited this page Nov 29, 2018
·
3 revisions
IF
returns one value if true, and another if false; both are provided by arguments.
IF(arg1, arg2, arg3)
-
arg1
is a condition that returns a value that can be interpreted as true or false -
arg2
is the value returned whenarg1
evaluates to true -
arg3
is the value returned whenarg1
evaluates to false
Let's say we're given a response with some fleet deployment information that looks like this:
{
"company_a":{
"deployed":true
}
}
If we want to yield responses dependent on fleet deployment, we can use IF
:
IF(company_a.deployed = TRUE, "Deployed and ready!", "Not deployed, not ready")
This will return "Deployed and ready!"
.