json:to-array( [$items as item()*], [$limit as xs:double?], [$zero as item()?] ) as json:array
Constructs a json:array
from a sequence of items.
array-node
constructor.
xquery version "1.0-ml"; json:to-array(1 to 2) => json:array( <json:array xmlns:json="http://marklogic.com/xdmp/json" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <json:value xsi:type="xs:integer">1</json:value> <json:value xsi:type="xs:integer">2</json:value> </json:array> )
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.