Skip to main content

$not

$not(value?) -> boolean
Compact type signature<x-:b>

If value is omitted, the current context value is used.

Browse categories

Source: JSONata

Documentation

Returns Boolean NOT on the argument. arg is first cast to a boolean

Examples

Negate a boolean flag

Input

This example uses the eligibility example input. The expression reads the top-level active flag and negates it.

Example input

JSON
{
"memberId": "mbr-3001",
"patientId": "pat-0001",
"plan": {
"planCode": "PLAN-100",
"planName": "ExampleCare Standard"
},
"active": true,
"effective": {
"start": "2026-01-01",
"end": "2026-12-31"
},
"copay": {
"visit": 25,
"urgentCare": 50
},
"deductibleRemaining": 300
}

Expression

$not(active)

Result

false