JSON.TOGGLE
Since 1.1.0JSON
Syntax
JSON.TOGGLE key pathFlips each boolean path matches.
Reply
- A JSONPath: the new values as
1and0. A legacy path:"true"or"false".
Examples
> JSON.SET d $ '{"active":true}'
OK
> JSON.TOGGLE d $.active
1) (integer) 0
> JSON.TOGGLE d .active
"true"