JSON.STRAPPEND

Syntax
JSON.STRAPPEND key [path] value
Available in:
Redis Stack / JSON 1.0.0
Time complexity:
O(1) when path is evaluated to a single value, O(N) when path is evaluated to multiple values, where N is the size of the key

Appends the json-string values to the string at path.

path defaults to root if not provided.

Return

Array reply of Integer reply - for each path, the string's new length, or Null reply if the matching JSON value is not a string.

Examples

redis> JSON.SET doc $ '{"a":"foo", "nested": {"a": "hello"}, "nested2": {"a": 31}}'
OK
redis> JSON.STRAPPEND doc $..a '"baz"'
1) (integer) 6
2) (integer) 8
3) (nil)
redis> JSON.GET doc $
"[{\"a\":\"foobaz\",\"nested\":{\"a\":\"hellobaz\"},\"nested2\":{\"a\":31}}]"

Feedback

If you've found issues on this page, or have suggestions for improvement, please submit a request to merge or open an issue in the repository.