json:array-pop( $array as json:array ) as item()*
Pop a value from the end of the array.
let $a := json:to-array((1, 2, 3)) let $v := json:array-pop($a) return (xdmp:to-json($a), $v) => [1, 2] 3