json:array-with( $array as json:array, $item as item()* ) as json:array
Push a value to the end of the array, increasing the size of the array by one. Returns the array as the result.
Parameters | |
---|---|
array | An array. |
item | New entries. |
let $a := json:to-array(1 to 3) =>json:array-with(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.