XML to JSON conversion with Multi-Valued Fields

If I have the following XML:

<Article_Keywords>
< keyword>dog< /keyword>
< keyword>pony< /keyword>
</Article_Keywords>

And want to convert it to (using groovy) an elasticsearch item:

{"Article_Keywords":["dog","pony"]}

How do i do so without the extra keyword tag:

{"Article_Keywords":{"keyword":["dog","pony"]}}

That's not looking like an elasticsearch question but a groovy one. You should better ask in groovy forums.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.