JSON.ARRAPPEND
Append the values into the array at path
after the last element in it
Required arguments
key
is key to modify.
is one or more values to append to one or more arrays.
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 .
Return value
JSON.ARRAPEND
returns an array of integer replies for each path, the array’s new size, or nil
, if the matching JSON value is not an array. For more information about replies, see .
Add a new color to a list of product colors
Create a document for noise-cancelling headphones in black and silver colors.
Add color blue
to the end of the array. JSON.ARRAPEND
returns the array’s new size.
See also
JSON.ARRINDEX
| JSON.ARRINSERT