JSON.STRAPPEND

Since 1.1.0JSONChanged in 1.2.1

Syntax

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

History

  • 1.2.1: arity: -2 -> -3

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