powered by
Evaluates a boolean expression to return one of the two specified return expressions.
condition(test, yes, no)
Return a list for using in mongopipe.
Expression which returns a boolean value.
Return this if the test returns true.
Return this if the test returns false.
if (FALSE) { cond <- condition(test = list("$isArray"="$chart"), yes = list("$size"="$chart"), no = 0) jsonlite::toJSON(cond) }
Run the code above in your browser using DataLab