Skip to content

Commit 48deebc

Browse files
authored
Update json.clear.md
1 parent 8bcab34 commit 48deebc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/commands/json.clear.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,21 @@ Already cleared values are ignored for empty containers and zero numbers.
3535
Create a JSON document.
3636

3737
{{< highlight bash >}}
38-
127.0.0.1:6379> JSON.SET doc $ '{"obj":{"a":1, "b":2}, "arr":[1,2,3], "str": "foo", "bool": true, "int": 42, "float": 3.14}'
38+
redis> JSON.SET doc $ '{"obj":{"a":1, "b":2}, "arr":[1,2,3], "str": "foo", "bool": true, "int": 42, "float": 3.14}'
3939
OK
4040
{{< / highlight >}}
4141

4242
Clear all container values. This returns the number of objects with cleared values.
4343

4444
{{< highlight bash >}}
45-
127.0.0.1:6379> JSON.CLEAR doc $.*
45+
redis> JSON.CLEAR doc $.*
4646
(integer) 4
4747
{{< / highlight >}}
4848

4949
Get the updated document. Note that numeric values have been set to `0`.
5050

5151
{{< highlight bash >}}
52-
127.0.0.1:6379> JSON.GET doc $
52+
redis> JSON.GET doc $
5353
"[{\"obj\":{},\"arr\":[],\"str\":\"foo\",\"bool\":true,\"int\":0,\"float\":0}]"
5454
{{< / highlight >}}
5555
</details>

0 commit comments

Comments
 (0)