I have a xml response and i want it to be converted to a map but some xml nodes are duplicate so i want those to be converted to List of maps. Currently I'm using this code suggested in this post : xmlslurper-to-return-all-xml-elements-into-a-map
Thanks in advance.
Sample :
<head>test</head>
<tail>
<name>1</name>
<name>2</name>
</tail>
</body>
and I want the following map :
["head" : "test" , "tail" : [["name":"1"],["name":"2"]]]