# Read map from json data

**URL:** <https://forum.cloverdx.com/t/read-map-from-json-data/1443>\
**Category:** CloverDX Platform\
**Created:** [June 27, 2014, 12:00am UTC](https://forum.cloverdx.com/t/read-map-from-json-data/1443 "2014-06-27T00:00:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![madan\_clover3](https://avatars.discourse-cdn.com/v4/letter/m/9d8465/32.png) [@madan\_clover3](https://forum.cloverdx.com/u/madan_clover3)\
**Post date:** [June 27, 2014, 12:00am UTC](https://forum.cloverdx.com/t/read-map-from-json-data/1443/1 "2014-06-27T00:00:00Z")

</div>

Hi,  
I am trying to read json element which is like,

```auto
{
  element : {
      "key1" : "value1" ,
      "key2" : "value2" ,
      "key3" : "value3" 
  }
}

```

and map it to an xml element.

```auto
<head>
   <element>
      <entry>
           <key>key1</key>
           <value>value1</value>
      </entry>
      <entry>
           <key>key2</key>
           <value>value2</value>
      </entry>
      <entry>
           <key>key3</key>
           <value>value3</value>
      </entry>
   </element>
</head>

```

Please suggest how can i do this.  
Thank you.

---

<div class="post-metadata">

**Author:** ![dpavlis](https://avatars.discourse-cdn.com/v4/letter/d/90ced4/32.png) [@dpavlis](https://forum.cloverdx.com/u/dpavlis)\
**Post date:** [June 28, 2014, 8:45pm UTC](https://forum.cloverdx.com/t/read-map-from-json-data/1443/2 "2014-06-28T20:45:42Z")

</div>

Hi,

If you just want to translate Json to XML, you may do it via CTL function [json2xml - see this doc.](http://doc.cloveretl.com/documentation/UserGuide/topic/com.cloveretl.gui.docs/docs/conversion-functions-ctl2.html#ctl2-json2xml).

For parsing JSON, [JSONExtract](http://doc.cloveretl.com/documentation/UserGuide/topic/com.cloveretl.gui.docs/docs/jsonextract.html) or [JSONReader](http://doc.cloveretl.com/documentation/UserGuide/topic/com.cloveretl.gui.docs/docs/jsonreader.html) components may be used.
