Skip to content

Commit b1ef49d

Browse files
authored
Update docs
1 parent 6606471 commit b1ef49d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/commands/json.arrappend.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,21 @@ For more information about replies, see [Redis serialization protocol specificat
3838
Create a document for noise-cancelling headphones in black and silver colors.
3939

4040
{{< highlight bash >}}
41-
127.0.0.1:6379> JSON.SET item:1 $ '{"name":"Noise-cancelling Bluetooth headphones","description":"Wireless Bluetooth headphones with noise-cancelling technology","connection":{"wireless":true,"type":"Bluetooth"},"price":99.98,"stock":25,"colors":["black","silver"]}'
41+
redis> JSON.SET item:1 $ '{"name":"Noise-cancelling Bluetooth headphones","description":"Wireless Bluetooth headphones with noise-cancelling technology","connection":{"wireless":true,"type":"Bluetooth"},"price":99.98,"stock":25,"colors":["black","silver"]}'
4242
OK
4343
{{< / highlight >}}
4444

4545
Add color `blue` to the end of the `colors` array. `JSON.ARRAPEND` returns the array's new size.
4646

4747
{{< highlight bash >}}
48-
127.0.0.1:6379> JSON.ARRAPPEND item:1 $.colors '"blue"'
48+
redis> JSON.ARRAPPEND item:1 $.colors '"blue"'
4949
1) (integer) 3
5050
{{< / highlight >}}
5151

5252
Return the new length of the `colors` array.
5353

5454
{{< highlight bash >}}
55-
127.0.0.1:6379> JSON.GET item:1
55+
redis> JSON.GET item:1
5656
"{\"name\":\"Noise-cancelling Bluetooth headphones\",\"description\":\"Wireless Bluetooth headphones with noise-cancelling technology\",\"connection\":{\"wireless\":true,\"type\":\"Bluetooth\"},\"price\":99.98,\"stock\":25,\"colors\":[\"black\",\"silver\",\"blue\"]}"
5757
{{< / highlight >}}
5858

0 commit comments

Comments
 (0)