JSON.TOGGLE
Toggle a Boolean value stored at
Required arguments
key
is key to modify.
is JSONPath to specify. Default is root $
.
Return
JSON.TOGGLE returns an array of integer replies for each path, the new value (0
if false
or if true
), or nil
for JSON values matching the path that are not Boolean. For more information about replies, see .
Toogle a Boolean value stored at path
Create a JSON document.
dragonfly> JSON.SET doc $ '{"bool": true}'
OK
Get the updated document.
"[{\"bool\":false}]"
Toggle the Boolean value.
Get the updated document.
dragonfly> JSON.GET doc $
See also
JSON.SET
| JSON.GET