Extracting json data in Clover ETL

410 Views Asked by At

How do I extract JSON values along with keys using Xpath in Clover ETL{"code": "in","percent": 83}? Eg :-. For the JSON object in the example I don't want just values i.e [in,83] I also want keys with them i.e ["code": in,"percent": 83]

1

There are 1 best solutions below

0
On

You are looking for "decode(name())" function of XPath.

There is an example in the documentation https://doc.cloverdx.com/documentation/UserGuide/topic/com.cloveretl.gui.docs/docs/jsonreader.html (search "name()") which is doing what you need.