<?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 Re: JSON Output File with multiple fields in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/JSON-Output-File-with-multiple-fields/m-p/2307976#M79363</link>
    <description>Hi 
&lt;BR /&gt;What's the incoming data before tWriteJSONfield ? and What are your expected result? Do you just want to output only one row of json-string?
&lt;BR /&gt;Shong</description>
    <pubDate>Mon, 08 Jul 2013 04:02:18 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-07-08T04:02:18Z</dc:date>
    <item>
      <title>JSON Output File with multiple fields</title>
      <link>https://community.qlik.com/t5/Talend-Studio/JSON-Output-File-with-multiple-fields/m-p/2307975#M79362</link>
      <description>Hello, 
&lt;BR /&gt;I am using the tWriteJSONfield component to structure inbound rows into JSON syntax. This correctly structures my data rows like: 
&lt;BR /&gt;{ 
&lt;BR /&gt; "office": { 
&lt;BR /&gt; "office_id": "1979", 
&lt;BR /&gt; "office_name": "AIR PRODUCTS", 
&lt;BR /&gt; "channel": [], 
&lt;BR /&gt; "address_line_1": "1775 EQUITY LANE", 
&lt;BR /&gt; "address_line_2": "PO BOX 1148", 
&lt;BR /&gt; "address_line_3": [], 
&lt;BR /&gt; "address_line_4": [], 
&lt;BR /&gt; "city": "TROY", 
&lt;BR /&gt; "state": "MI", 
&lt;BR /&gt; "zip_code": "48099-1155", 
&lt;BR /&gt; "country": "US", 
&lt;BR /&gt; "territories": { 
&lt;BR /&gt; "territory": { 
&lt;BR /&gt; "state_fips": "0", 
&lt;BR /&gt; "county_fips": "0" 
&lt;BR /&gt; } 
&lt;BR /&gt; } 
&lt;BR /&gt; } 
&lt;BR /&gt;} 
&lt;BR /&gt;My problem is that now I want all of my rows returned into a grouping element like "offices":{}. I have tried the following: 
&lt;BR /&gt;1. Using the tfileOutputJSON component after tWriteJSONfield. This will group my rows into a parent element, however each office element then has the quotes escaped like {\"office\":{\"office_id\":\"2231\",\"office_name\": 
&lt;BR /&gt;2. Changing my tWriteJSONField to include the "offices":{} grouping. This just adds "offices":{} to each output row without grouping 
&lt;BR /&gt;I see there are some new options in the 5.3 release that might be helpful, but I need to accomplish this in 5.1.2. 
&lt;BR /&gt;Any guidance is appreciated. 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEQe.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/146002i8210C6D1B7A2E194/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEQe.png" alt="0683p000009MEQe.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEj1.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/140030iDFA053699F340B26/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEj1.png" alt="0683p000009MEj1.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Thu, 04 Jul 2013 15:25:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/JSON-Output-File-with-multiple-fields/m-p/2307975#M79362</guid>
      <dc:creator>timschotz</dc:creator>
      <dc:date>2013-07-04T15:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: JSON Output File with multiple fields</title>
      <link>https://community.qlik.com/t5/Talend-Studio/JSON-Output-File-with-multiple-fields/m-p/2307976#M79363</link>
      <description>Hi 
&lt;BR /&gt;What's the incoming data before tWriteJSONfield ? and What are your expected result? Do you just want to output only one row of json-string?
&lt;BR /&gt;Shong</description>
      <pubDate>Mon, 08 Jul 2013 04:02:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/JSON-Output-File-with-multiple-fields/m-p/2307976#M79363</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-08T04:02:18Z</dc:date>
    </item>
  </channel>
</rss>

