Hi All,

I have a json query string and I performed
json:transform-from-json($json-query). I get the below output.

<json type="object" xmlns="http://marklogic.com/xdmp/json/basic";>
  <query type="object">
    <and-query type="object">
      <queries type="array">
<json type="object">
  <range-constraint-query type="object">
    <constraint-name type="string">country</constraint-name>
    <value type="array">
      <item type="string">FRA</item>
    </value>
  </range-constraint-query>
</json>
<json type="object">
  <range-constraint-query type="object">
    <constraint-name type="string">TravelType</constraint-name>
    <value type="array">
      <item type="string">TOURISM</item>
    </value>
  </range-constraint-query>
</json>
      </queries>
    </and-query>
  </query>
</json>

How do I traverse through the output xml to get each constraint-name node.
I tried normal xpath on this output
json:transform-from-json($json-query)//constraint-name. But this doesnot
work.

Please help.

Thanks.
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to