Loading TOC...

xdmp:json-pointer

xdmp:json-pointer(
   $node as node(),
   $path as xs:string
) as node()?

Summary

Resolve a (relative) JSON pointer (see RFC 6901) in the context of a node and return the result, if any.

Parameters
node The JSON context node.
path The JSON pointer string.

Example

  xdmp:json-pointer(
     object-node{
       "properties": object-node{
          "count": object-node{ "type":"integer", "minimum":0 },
          "items": object-node{ "type":"array", "items": object-node{"type":"string", "minLength":1 } }
        }
     },"/properties/count")
=> object-node{ "type":"integer", "minimum":0 }

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