Skip to content

Commit 44d68fe

Browse files
authored
Update json.arrtrim.md (RedisJSON#715)
fix: ARRTRIM examples. Added missed lines
1 parent 65335b3 commit 44d68fe

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/commands/json.arrtrim.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ Behavior as of RedisJSON v2.0:
1414

1515
@examples
1616

17-
```
17+
```sql
18+
redis> JSON.SET doc $ '{"a":[], "nested": {"a": [1,4]}}'
19+
OK
1820
redis> JSON.ARRTRIM doc $..a 1 1
1921
1) (integer) 0
2022
2) (integer) 1
@@ -28,4 +30,6 @@ OK
2830
redis> JSON.ARRTRIM doc $..a 1 1
2931
1) (integer) 1
3032
2) (nil)
33+
redis> JSON.GET doc $
34+
"[{\"a\":[2],\"nested\":{\"a\":false}}]"
3135
```

0 commit comments

Comments
 (0)