JSON.STRAPPEND

    Append the values to the string at path

    Required arguments

    key

    is key to modify.

    is value to append to one or more strings.

    About using strings with JSON commands

    To specify a string as an array value to append, wrap the quoted string with an additional set of single quotes. Example: '"silver"'. For more detailed use, see .

    path

    Return value

    JSON.STRAPPEND returns an array of integer replies for each path, the string’s new length, or nil, if the matching JSON value is not a string. For more information about replies, see Redis serialization protocol specification.

    1. OK
    2. 127.0.0.1:6379> JSON.STRAPPEND doc $..a '"baz"'
    3. 1) (integer) 6
    4. 3) (nil)
    5. 127.0.0.1:6379> JSON.GET doc $
    6. "[{\"a\":\"foobaz\",\"nested\":{\"a\":\"hellobaz\"},\"nested2\":{\"a\":31}}]"

    See also

    JSON.ARRAPEND | JSON.ARRINSERT