How to get each field of json doc in XQUERY Marklogic?
let $doc :=
{
"field1" :'t',
"field2" : 'th',
"filed4": 'the'
}
return
$doc//??,
{
"New Filed" : "Added"
}
So how can we get the output like below ?
{ "field1" :'t', "field2" : 'th', "filed4": 'the' ,"New Filed" : "Added"}