Loading TOC...

MarkLogic Server 11.0 Product Documentation
json:array-pop

json:array-pop(
   $array as json:array
) as item()*

Summary

Pop a value from the end of the array.

Parameters
array An array.

Example

  let $a := json:to-array((1, 2, 3))
  let $v := json:array-pop($a)
  return (xdmp:to-json($a), $v)
  => [1, 2] 3

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.