MarkLogic 9 Product Documentation
xdmp.arrayValues

xdmp.arrayValues(
   Array as Array,
   [flatten as Boolean]
) as Sequence

Summary

Returns the array values as a Sequence.

Parameters
Array An array.
flatten Include values from subarrays in the sequence. The default is false, meaning that subarrays are returned as array values.

Example


var a = ["hello","world",["one","two"]];
xdmp.arrayValues(a);
=> A Sequence with the following values:
hello
world
["one", "two"]

Example

var a = ["hello","world",["one","two"]];
xdmp.arrayValues(a,true);
=> A Sequence with the following values: 
hello
world
one
two
Powered by MarkLogic Server | Terms of Use | Privacy Policy