JSON.DEL
Since 1.1.0JSON
Syntax
JSON.DEL key [path]Deletes the values path matches in the JSON document at key. Deleting the root deletes the key; that is what happens with no path.
Reply
- The number of values deleted.
Examples
> JSON.SET d $ '{"addr":{"city":"London","zip":"N1"}}'
OK
> JSON.DEL d $.addr.zip
(integer) 1
> JSON.DEL d
(integer) 1
> EXISTS d
(integer) 0