I have a XML which I am trying to convert into JSON. XML is like below
let $config := json:config("custom")
let $x :=
<results>
<result>
<a></a>
<b></b>
</result>
<result>
<a></a>
<b></b>
</result>
</results>
return
json:transform-to-json($x,$config)
the above code is return me the json format only with one child result element(the last one). How can I transform the xml to json with two child result elements?