JSON.STRAPPEND

Since 1.1.0JSON

Syntax

JSON.STRAPPEND key [path] value
  • Flags: write
  • ACL categories: @json, @slow, @write
  • Arity: -2

Appends a JSON string to each string path matches. value is JSON text, so it is quoted: '" L."'.

Reply

  • A JSONPath: the new lengths, nil where a match is not a string. A legacy path: the one new length.

Examples

> JSON.SET d $ '{"name":"Ada"}'
OK
> JSON.STRAPPEND d $.name '" L."'
1) (integer) 6