Skip to content

Commit b9851a3

Browse files
authored
Merge branch 'master' into rafi-memtest1
2 parents f0f34ff + 0e99556 commit b9851a3

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

docs/commands.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,27 @@ OK
185185
(integer) 2
186186
```
187187

188+
### JSON.CLEAR
189+
190+
> **Available since 2.0.0.**
191+
> **Time complexity:** O(N), where N is the number of cleared values
192+
193+
#### Syntax
194+
195+
```
196+
JSON.CLEAR <key> [path]
197+
```
198+
199+
#### Description
200+
201+
Clear a container value (Array/Object).
202+
203+
`path` defaults to root if not provided. Non-existing keys and paths are ignored.
204+
205+
#### Return value
206+
207+
[Integer][2], specifically the number of containers cleared.
208+
188209
### JSON.NUMINCRBY
189210

190211
> **Available since 1.0.0.**
@@ -246,6 +267,25 @@ OK
246267
"[null,4,10,null]"
247268
```
248269

270+
### JSON.TOGGLE
271+
272+
> **Available since 2.0.0.**
273+
> **Time complexity:** O(1).
274+
275+
#### Syntax
276+
277+
```
278+
JSON.TOGGLE <key> <path>
279+
```
280+
281+
#### Description
282+
283+
Toggle a boolean value stored at `path`.
284+
285+
#### Return value
286+
287+
[Integer][2], specifically the new value (0-false or 1-true), or [null][6] element for JSON values matching the path which are not boolean.
288+
249289
### JSON.STRAPPEND
250290

251291
> **Available since 1.0.0.**

0 commit comments

Comments
 (0)