JSON.ARRAPPEND

Since 1.1.0JSON

Syntax

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

Appends values, each JSON text, to each array path matches.

Reply

  • The new lengths; nil where a match is not an array.

Examples

> JSON.SET d $ '{"tags":["math","code"]}'
OK
> JSON.ARRAPPEND d $.tags '"art"' '"chess"'
1) (integer) 4