Skip to content

Commit

Permalink
Merge pull request #1162 from enjoy-binbin/fix_json_mset_exmaple
Browse files Browse the repository at this point in the history
Fix execution examples in JSON MSET doc
  • Loading branch information
LiorKogan committed Dec 19, 2023
2 parents a27a0a7 + aa086e7 commit 619b3d9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/commands/json.mset.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,16 @@ For more information about replies, see [Redis serialization protocol specificat
<summary><b>Add a new values in multiple keys</b></summary>

{{< highlight bash >}}
redis> JSON.MSET doc1 $ '{"a":2}' doc2 $.f.a '3' doc3 $ '{"f1": {"a":1}, "f2":{"a":2}}'
redis> JSON.MSET doc1 $ '{"a":1}' doc2 $ '{"f":{"a":2}}' doc3 $ '{"f1":{"a":0},"f2":{"a":0}}'
OK
redis> JSON.MSET doc1 $ '{"a":2}' doc2 $.f.a '3' doc3 $ '{"f1":{"a":1},"f2":{"a":2}}'
OK
redis> JSON.GET doc1 $
"[{\"a\":2}]"
redis> JSON.GET doc2 $
"[{\"f\":{\"a\":3]"
"[{\"f\":{\"a\":3}}]"
redis> JSON.GET doc3
"{\"f1\":{\"a\":3},\"f2\":{\"a\":3}}"
"{\"f1\":{\"a\":1},\"f2\":{\"a\":2}}"
{{< / highlight >}}
</details>

Expand Down

0 comments on commit 619b3d9

Please sign in to comment.