<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Create a JSON file using features of native tWriteJSONField component - loop and group by in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Create-a-JSON-file-using-features-of-native-tWriteJSONField/m-p/2367685#M131034</link>
    <description>&lt;P&gt;I have a joblet ouput with schema as below:&lt;/P&gt; 
&lt;PRE&gt;id
attr1
attr2
attrNext&lt;/PRE&gt; 
&lt;P&gt;&lt;BR /&gt;I would like to create a JSON file that looks like below:&lt;/P&gt; 
&lt;PRE&gt;[ {
      "id":"100001",
      "attrMain":[
         {
            "attr1":"aa",
            "attr2":"abc@xyz.com"
         },
         {
            "attr1":"bb",
            "attr2":"pqr@abc.com"
         },
         {
            "attr1":"cc",
            "attr2":"xyz@xyz.com"
         },
      ]
   }
]&lt;/PRE&gt; 
&lt;P&gt;I have so far been using tWriteJSONField with a Group by over "id" &amp;amp; setting attrMain as the group element, and attr1 as loop element in the "Configure JSON Tree" editor. I would like to achieve the same using tJSONDoc* components. So far, I have been able to get the below output (screenshot of job attached):&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;[   {
  "id" : "100001",
  "attrMain" : [ {
    "attr1" : "aa"
  }, {
    "attr2" : "abc@xyz.com"
  } ]
}, {
  "id" : "100001",
  "attrMain" : [ {
    "attr1" : "bb"
  }, {
    "attr2" : "pqr@abc.com"
  } ]
}, {
  "id" : "100001",
  "attrMain" : [ {
    "attr1" : "cc"
  }, {
    "attr2" : "xyz@xyz.com"
  } ]
} ]&lt;/PRE&gt; 
&lt;P&gt;Any suggestions? Happy to provide more information on request!&lt;/P&gt;</description>
    <pubDate>Wed, 12 Jun 2019 23:04:19 GMT</pubDate>
    <dc:creator>aviralagl</dc:creator>
    <dc:date>2019-06-12T23:04:19Z</dc:date>
    <item>
      <title>Create a JSON file using features of native tWriteJSONField component - loop and group by</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Create-a-JSON-file-using-features-of-native-tWriteJSONField/m-p/2367685#M131034</link>
      <description>&lt;P&gt;I have a joblet ouput with schema as below:&lt;/P&gt; 
&lt;PRE&gt;id
attr1
attr2
attrNext&lt;/PRE&gt; 
&lt;P&gt;&lt;BR /&gt;I would like to create a JSON file that looks like below:&lt;/P&gt; 
&lt;PRE&gt;[ {
      "id":"100001",
      "attrMain":[
         {
            "attr1":"aa",
            "attr2":"abc@xyz.com"
         },
         {
            "attr1":"bb",
            "attr2":"pqr@abc.com"
         },
         {
            "attr1":"cc",
            "attr2":"xyz@xyz.com"
         },
      ]
   }
]&lt;/PRE&gt; 
&lt;P&gt;I have so far been using tWriteJSONField with a Group by over "id" &amp;amp; setting attrMain as the group element, and attr1 as loop element in the "Configure JSON Tree" editor. I would like to achieve the same using tJSONDoc* components. So far, I have been able to get the below output (screenshot of job attached):&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;[   {
  "id" : "100001",
  "attrMain" : [ {
    "attr1" : "aa"
  }, {
    "attr2" : "abc@xyz.com"
  } ]
}, {
  "id" : "100001",
  "attrMain" : [ {
    "attr1" : "bb"
  }, {
    "attr2" : "pqr@abc.com"
  } ]
}, {
  "id" : "100001",
  "attrMain" : [ {
    "attr1" : "cc"
  }, {
    "attr2" : "xyz@xyz.com"
  } ]
} ]&lt;/PRE&gt; 
&lt;P&gt;Any suggestions? Happy to provide more information on request!&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 23:04:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Create-a-JSON-file-using-features-of-native-tWriteJSONField/m-p/2367685#M131034</guid>
      <dc:creator>aviralagl</dc:creator>
      <dc:date>2019-06-12T23:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Create a JSON file using features of native tWriteJSONField component - loop and group by</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Create-a-JSON-file-using-features-of-native-tWriteJSONField/m-p/2367686#M131035</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt; 
&lt;P&gt;tJsonDocOutput is a custom component written by talend community user and shared on talend exchange portal.&lt;/P&gt; 
&lt;P&gt;We don't have the source code of these components. &amp;nbsp;It is the ownership of the person who built it. Feel free to contact the author directly.&lt;/P&gt; 
&lt;P&gt;Best regards&lt;/P&gt; 
&lt;P&gt;Sabrina&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2019 08:09:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Create-a-JSON-file-using-features-of-native-tWriteJSONField/m-p/2367686#M131035</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-01T08:09:45Z</dc:date>
    </item>
  </channel>
</rss>

