json:array-push( $array as json:array, $item as item()* ) as empty-sequence()
Push a value to the end of the array, increasing the size of the array by one.
Parameters | |
---|---|
array | An array. |
item | New entries. |
let $a := json:to-array(1 to 3) let $_ := json:array-push($a, 4) return xdmp:to-json($a) => [1, 2, 3, 4]
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.