Skip to content

Instantly share code, notes, and snippets.

@dmcassel
Created September 22, 2015 17:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmcassel/23566579e43b44d5c934 to your computer and use it in GitHub Desktop.
Save dmcassel/23566579e43b44d5c934 to your computer and use it in GitHub Desktop.
(:
: Evaluate JavaScript from XQuery, passing in external variables and returning
: results as XQuery types.
:)
xdmp:javascript-eval(
"var result = []; for(var p in param) {result.push(p); result.push(param[p]);} result;",
(xs:QName("param"), object-node { "a": "A", "b": "B"})
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment