Loading TOC...


   $source-nodes as item()*,
   $fn as function(*)
) as json:array?


This function is deprecated and will be removed in a future release.
Convert one or more source nodes into an array by invoking a function on each of the elements. This is a utility function used by the code generated by Entity Services.

source-nodes The nodes to be converted into array values.
fn A function reference. The function is applied to each value to be inserted into the array.

See Also


xquery version "1.0-ml";
import module namespace es = "http://marklogic.com/entity-services"
    at "/MarkLogic/entity-services/entity-services.xqy";

let $nodes := (
return es:extract-array($nodes, fn:data#1)

(: Returns the following JSON array: ["1", "2"] :)

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