<?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: How to create this json output using tJSONDoc in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-create-this-json-output-using-tJSONDoc/m-p/2259369#M40869</link>
    <description>&lt;P&gt;&amp;nbsp;Hi Jan,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have added a screenshot of this component before I deleted it. I was trying to add this data to the tJSONDocOutput_5 (bases on emailaddress), but I didn't knew how to loop the tFlowFixedInput_6 data into the value field (it can also contain 2 or more rows).&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks for your help!&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Regards,&lt;/P&gt; 
&lt;P&gt;Remco&lt;/P&gt;</description>
    <pubDate>Tue, 26 Sep 2017 00:09:04 GMT</pubDate>
    <dc:creator>rsmits</dc:creator>
    <dc:date>2017-09-26T00:09:04Z</dc:date>
    <item>
      <title>How to create this json output using tJSONDoc</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-create-this-json-output-using-tJSONDoc/m-p/2259361#M40861</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Using the tJSONDoc components from jlolling (release 9.0 20170409) I'm currently trying to create this output in Talend Open Studio for Data Integration v6.3.0:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;(Edited for multiple categories)&lt;/P&gt; 
&lt;PRE&gt;{
  "category": [ {
    "id": 0,
    "name": "string",
    "is_active": true,
    "custom_attributes": [
      {
        "attribute_code": "string",
        "value": "string"
      } ]&lt;BR /&gt;&amp;nbsp; }, {&lt;BR /&gt;    "id": 1,
    "name": "string",
    "is_active": true,
    "custom_attributes": [
      {
        "attribute_code": "string",
        "value": "string"
    } ]&lt;BR /&gt;  } ] &lt;BR /&gt;}&lt;/PRE&gt; 
&lt;P&gt;My input is a database table containing all the categories (columns like id, name, etcetera all available). The json output should be 1 document containing all the categories. The custom_attributes are also simply some columns from the input table, in the output they do need to be placed within the "custom_attributes" as shown above.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I'm having trouble to find out which (tJSONDOC) components to use in which order to get the single json document containing output above. I did check the manual &lt;A href="http://jan-lolling.de/talend/components/help/tJSONDoc.pdf" target="_blank" rel="nofollow noopener noreferrer"&gt;http://jan-lolling.de/talend/components/help/tJSONDoc.pdf&lt;/A&gt; but I'm not succeeding. Hope someone can help me getting into the right direction with the right order of components I should use. &amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;EDIT:&lt;/P&gt; 
&lt;P&gt;So far I'm using:&lt;/P&gt; 
&lt;P&gt;tJsonDocOpen_1--&amp;gt;OnSubjoOk--&amp;gt;tJDBCInput--&amp;gt;tJsonDocOputput and get this:&lt;/P&gt; 
&lt;PRE&gt;{
  "category" : [ {
    "id" : "430",
    "name" : "my category",
    "is_active" : "false"
  }, {
    "id" : "429",
    "name" : "my category 2",
    "is_active" : "false"
  },&lt;BR /&gt;....&lt;/PRE&gt; 
&lt;P&gt; 
 &lt;STRIKE&gt;
   Issue one: The category is followed by a&amp;nbsp;[ . I've set JSON path for the parent to "$.category" unsure whether that is the right way 
 &lt;/STRIKE&gt; (no issue here, for multiple categories the [ is of course needed, thanks jlolling for pointing me to the mistake)&lt;BR /&gt;Issue two: the custom_attributes. I can add columns within 'custom_attributes' by adding a tJSONDocOutput_2, but not in this format:&lt;/P&gt; 
&lt;PRE&gt;      {
        "attribute_code": "string",
        "value": "string"
      }&lt;/PRE&gt; 
&lt;P&gt;:&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2017 20:11:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-create-this-json-output-using-tJSONDoc/m-p/2259361#M40861</guid>
      <dc:creator>hvanderborg</dc:creator>
      <dc:date>2017-05-08T20:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to create this json output using tJSONDoc</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-create-this-json-output-using-tJSONDoc/m-p/2259362#M40862</link>
      <description>&lt;P&gt;I am a bit confused about your desired output and what you provide as input.&lt;/P&gt; 
&lt;P&gt;First of all, please take care you use the latest release: Download it best way from Github:&amp;nbsp;&lt;A href="https://github.com/jlolling/talendcomp_tJSONDoc/releases" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/jlolling/talendcomp_tJSONDoc/releases&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;Your output contains only one array and this looks like the custom_attributes but you have obviously more than one category!&lt;/P&gt; 
&lt;P&gt;I guess you have more than one category and every category has more than one custom_attributes. Is this correct?&lt;/P&gt; 
&lt;P&gt;How does your input looks like?&lt;/P&gt; 
&lt;P&gt;You can solve this job in various ways,&amp;nbsp;If you can provide your input I can complete the examples:&lt;/P&gt; 
&lt;P&gt;1. You can do this:&lt;/P&gt; 
&lt;P&gt;tJSONDocOpen -OnSubjobOk-&amp;gt;&lt;/P&gt; 
&lt;P&gt;tJDBCInput --flow--&amp;gt; tJSONDocOutput_1 (for categories)&amp;nbsp;&lt;SPAN&gt;--flow--&amp;gt; tHashOutput&amp;nbsp;&lt;/SPAN&gt;--iterate--&amp;gt; tHashInput&amp;nbsp;&lt;SPAN&gt;--flow--&amp;gt;&amp;nbsp;tJSONDocOutput_2 (for custom_attributes) &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Here take care&amp;nbsp;tJSONDocOutput_2 is referencing&amp;nbsp;tJSONDocOutput_1&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;2. The better way - level by level&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;tJSONDocOpen -OnSubjobOk-&amp;gt;&lt;/P&gt; 
&lt;P&gt;tJDBCInput_1 (only categories) --flow--&amp;gt; tJSONDocOutput_1 (for categories only) (take care the id is set as key)&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;tJDBCInput_2 (only custom_attributes + category_id as foreign-key field + use the SQL-Key-List oftJSONDocOutput_1 in where condition) --flow--&amp;gt; tJSONDocOutput_2 (for custom_attr&amp;nbsp;only) (take care the category_id is set as foreign-key field, it is not necessary to check the use option for this column)&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2017 00:02:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-create-this-json-output-using-tJSONDoc/m-p/2259362#M40862</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-10T00:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to create this json output using tJSONDoc</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-create-this-json-output-using-tJSONDoc/m-p/2259363#M40863</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Many thanks, &lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Regarding issue1: you were right to point me to the multiple categories&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; so issue 1 was non existing.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Regarding issue2: &lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;solving the custom attributes, I tried your 'the better way' and&amp;nbsp;it seems that fully solved my issue.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;in tJSONDocOutput_ 2 I have used these settings:&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;'Parent JSON Document': tJSONDocOutput_1&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;checked Use foreign key column to address the parent nod.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Fireign key column: id&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;JSON path for the parent "custom_attributes"&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Output structure: 'Array of new created json objects with the schema columns as attributes'&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;then selected 'use column' for all custom attributes&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Also I've used the sql list in where clause you pointed out.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;It seems you have provided exactly the right clues I needed&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;EDIT, I was too quick thinking it was solved:&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;I now have this:&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;{
  "category": [ {
    "id": 0,
    "name": "string",
    "is_active": true,
    "custom_attributes": [
      {
        "custom_attribute_abc": "string with value of this attribute", &lt;BR /&gt;        "custom_attribute_xyz": "string with value of this attribute" &lt;BR /&gt;    } ] &lt;BR /&gt; }, ...&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt; 
&lt;P&gt;So I still have the challenge to get to:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;{
  "category": [ {
    "id": 0,
    "name": "string",
    "is_active": true,
    "custom_attributes": [
      {
        "attribute_code": "custom_attribute_abc", &lt;BR /&gt;        "value": "string with value of this attribute" &lt;BR /&gt;      },{ &lt;BR /&gt;        "attribute_code": "custom_attribute_xyz", &lt;BR /&gt;        "value": "string with value of this attribute" &lt;BR /&gt;      } ] &lt;BR /&gt;   }, {....&lt;/PRE&gt; 
&lt;P&gt;To stick to the example above: my input rows&amp;nbsp;have the columns: id, custom_attribute_abc, custom_attribute_xyz&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2017 18:05:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-create-this-json-output-using-tJSONDoc/m-p/2259363#M40863</guid>
      <dc:creator>hvanderborg</dc:creator>
      <dc:date>2017-05-25T18:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to create this json output using tJSONDoc</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-create-this-json-output-using-tJSONDoc/m-p/2259364#M40864</link>
      <description>&lt;P&gt;Ok, in the case you know the custom attribute names it is easy, you can simply get dynamically named attributes by using the alternative attribute name field and set here a globalMap variable.&lt;/P&gt;&lt;P&gt;In case you do not know which attribute you will get, I will have to provide a functionality. I have actually a good idea how to solve this. Please let me some days and I will provide a solution.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2017 18:04:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-create-this-json-output-using-tJSONDoc/m-p/2259364#M40864</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-01T18:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to create this json output using tJSONDoc</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-create-this-json-output-using-tJSONDoc/m-p/2259365#M40865</link>
      <description>&lt;P&gt;EDIT:&amp;nbsp;I think I know the attribute names beforehand, not 100% just yet.&lt;/P&gt;
&lt;P&gt;Removed an example which was not dynamic (in the way meant by you).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2017 19:51:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-create-this-json-output-using-tJSONDoc/m-p/2259365#M40865</guid>
      <dc:creator>hvanderborg</dc:creator>
      <dc:date>2017-06-08T19:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to create this json output using tJSONDoc</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-create-this-json-output-using-tJSONDoc/m-p/2259366#M40866</link>
      <description>&lt;P&gt;I can still move forward with known attributes. Although easy, I don't see the design just yet&amp;nbsp;for known attribute names. I do know where to set an 'alternative name' in tJSONDocOutput and how to use a variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So my input table for example could be&amp;nbsp;this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;product_id &amp;nbsp; customattributeABC &amp;nbsp; custom_attribute_DEF &amp;nbsp; custom_attribute_XYZ&lt;/P&gt;
&lt;P&gt;product1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; yellow &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 17,3&lt;/P&gt;
&lt;P&gt;product2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; purple &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 99,0&lt;/P&gt;
&lt;P&gt;product3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; blue &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2,7&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So output needs to be: (showing only the custom_attributes part for product1)&lt;/P&gt;
&lt;PRE&gt;"custom_attributes": [
      {
        "attribute_code": "custom_attribute_ABC", &lt;BR /&gt;        "value": "yellow" &lt;BR /&gt;      },{ &lt;BR /&gt;        "attribute_code": "&lt;SPAN&gt;custom_attribute_DEF&lt;/SPAN&gt;", &lt;BR /&gt;        "value": 1 &lt;BR /&gt;      },{ &lt;BR /&gt;        "attribute_code": "&lt;SPAN&gt;custom_attribute_XYZ&lt;/SPAN&gt;", &lt;BR /&gt;        "value": 17,3 &lt;BR /&gt; } ]&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What should my design look like?&lt;BR /&gt;I know the table comes from&amp;nbsp;tJDBCInput, output should likely be&amp;nbsp;tJSONDocOutput with used columns 'attribute_code' and 'value' and the 'Alternative name' shoud be a variable for the column 'attribute_code'. But the rest of the flow is unclear to me just yet.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;EDIT, found a solution:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Solved it this way:&lt;/P&gt;
&lt;P&gt;tJDBCInput--&amp;gt;tUnpivotRow (by wzawwin)--&amp;gt;tJSONDocOutput&lt;/P&gt;
&lt;P&gt;In tUnpivotRow I indicated the product_id as 'Row key'. And in tJSONDocOutput I've set an 'Alternative name' for 'pivot_key' (attribute_code) and 'pivot_value' (value).&amp;nbsp;As far as I can see now this brings the expected result.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 19:17:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-create-this-json-output-using-tJSONDoc/m-p/2259366#M40866</guid>
      <dc:creator>hvanderborg</dc:creator>
      <dc:date>2017-06-23T19:17:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to create this json output using tJSONDoc</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-create-this-json-output-using-tJSONDoc/m-p/2259367#M40867</link>
      <description>&lt;P&gt;I'm also working with the tJSON components and succeeded to create the following JSON string:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture2.JPG" style="width: 414px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lqti.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/148351iF6132362B77F4BBA/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lqti.jpg" alt="0683p000009Lqti.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The only thing that I want to add&amp;nbsp;is replacing the null value of the OrderLineItems with the following value:&lt;/P&gt; 
&lt;P&gt;{&lt;BR /&gt;&amp;nbsp; "name":"OrderLineItems",&lt;BR /&gt;&amp;nbsp; "value":"[&lt;BR /&gt;&amp;nbsp; {\"productID\":\"A12345\",\"description\":\"Red Dress\",\"quantity\":5,\"price\":10.00,\"extPrice\":50.00},&lt;BR /&gt;&amp;nbsp; {\"productID\":\"B98765\",\"description\":\"Yellow Shoes\",\"quantity\":2,\"price\":35.00,\"extPrice\":75.00}]"&lt;BR /&gt;}&lt;/P&gt; 
&lt;P&gt;* I'm not going to use the same attributes, but the attributes below (tFixedFlowInput6).&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;This is how my job looks like right now:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="OverviewJob1.JPG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LqxK.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/127794i624D37AF2509CB0E/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LqxK.jpg" alt="0683p000009LqxK.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="OverviewJob2.JPG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LqxU.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/134705iC8A8BE89510E94C2/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LqxU.jpg" alt="0683p000009LqxU.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;tFixedFlowInput1 and tFixflowInput5 contain the following data:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="OverviewJob3.JPG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LqpW.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/146649iDE6F776DE4C4918B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LqpW.jpg" alt="0683p000009LqpW.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;tMap2:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="OverviewJob4.JPG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LqvV.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/137801i82917F3537A5BBC0/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LqvV.jpg" alt="0683p000009LqvV.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;tFixedflowInput6 contain the values that I want to add:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="OverviewJob5.JPG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lqqa.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/139926i6D5AAEF6DA0ED996/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lqqa.jpg" alt="0683p000009Lqqa.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;I tried different things but they did not give me the desired result. Any suggestions?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 22:48:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-create-this-json-output-using-tJSONDoc/m-p/2259367#M40867</guid>
      <dc:creator>rsmits</dc:creator>
      <dc:date>2017-09-25T22:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to create this json output using tJSONDoc</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-create-this-json-output-using-tJSONDoc/m-p/2259368#M40868</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;sorry I am unable to spot tFixedFlowInput_6 in your job. Perhaps you send an update of the screenshot?&lt;/P&gt; 
&lt;P&gt;Best regards&lt;/P&gt; 
&lt;P&gt;Jan Lolling&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 23:22:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-create-this-json-output-using-tJSONDoc/m-p/2259368#M40868</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-25T23:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to create this json output using tJSONDoc</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-create-this-json-output-using-tJSONDoc/m-p/2259369#M40869</link>
      <description>&lt;P&gt;&amp;nbsp;Hi Jan,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have added a screenshot of this component before I deleted it. I was trying to add this data to the tJSONDocOutput_5 (bases on emailaddress), but I didn't knew how to loop the tFlowFixedInput_6 data into the value field (it can also contain 2 or more rows).&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks for your help!&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Regards,&lt;/P&gt; 
&lt;P&gt;Remco&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2017 00:09:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-create-this-json-output-using-tJSONDoc/m-p/2259369#M40869</guid>
      <dc:creator>rsmits</dc:creator>
      <dc:date>2017-09-26T00:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to create this json output using tJSONDoc</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-create-this-json-output-using-tJSONDoc/m-p/2259370#M40870</link>
      <description>&lt;P&gt;Does anyone have an idea?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2017 22:25:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-create-this-json-output-using-tJSONDoc/m-p/2259370#M40870</guid>
      <dc:creator>rsmits</dc:creator>
      <dc:date>2017-09-27T22:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to create this json output using tJSONDoc</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-create-this-json-output-using-tJSONDoc/m-p/2259371#M40871</link>
      <description>&lt;P&gt;Hi, for me based on the screenshot it is not quite clear where in your job you are writing the optionalData - here I would expect also a schema column "value" with the mentioned String as data. Looks pretty normal and easy.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you tell us this detail?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2017 22:31:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-create-this-json-output-using-tJSONDoc/m-p/2259371#M40871</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-27T22:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to create this json output using tJSONDoc</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-create-this-json-output-using-tJSONDoc/m-p/2259372#M40872</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am writing the optionalData somewhere in the middle (tJSONDocOutput_5). I know how to put the fieldvalues under the mergeTriggerRecords, but I don't know how to move the lines under the orderlineitems with the tJSONDocOutput.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Regards,&lt;/P&gt; 
&lt;P&gt;Remco&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;This is how it should be:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;{
   "mergeTriggerRecordData":{
      "mergeTriggerRecords":[
         {
            "fieldValues":[
               "mdi1234@foobar.com"
            ],
            "optionalData":[
               {
                  "name":"ADDRESS1",
                  "value":"AddressStreet 17"
               },
               {
                  "name":"FIRST_NAME",
                  "value":"jim_1"
               },
               {
                  "name":"LAST_NAME",
                  "value":"smith_1"
               },
               {
                  "name":"OrderLineItems",
                  "value":[
                     {
                        "productID":"A12345",
                        "description":"Red Dress",
                        "quantity":5,
                        "price":10.00,
                        "extPrice":50.00
                     },
                     {
                        "productID":"B98765",
                        "description":"Yellow Shoes",
                        "quantity":2,
                        "price":35.00,
                        "extPrice":75.00
                     }
                  ]
               }
            ]
         },
         {
            "fieldValues":[
               "mdi.1234@foobarcorp.com"
            ],
            "optionalData":[
               {
                  "name":"FIRST_NAME",
                  "value":"jim_2"
               },
               {
                  "name":"LAST_NAME",
                  "value":"smith_2"
               }
            ]
         }
      ],
      "fieldNames":[
         "EMAIL_ADDRESS_"
      ]
   },
   "mergeRule":{
      "htmlValue":"H",
      "matchColumnName1":"EMAIL_ADDRESS_",
      "matchColumnName2":"null",
      "optoutValue":"O",
      "insertOnNoMatch":true,
      "defaultPermissionStatus":"OPTIN",
      "rejectRecordIfChannelEmpty":"E",
      "optinValue":"I",
      "updateOnMatch":"REPLACE_ALL",
      "textValue":"T",
      "matchOperator":"NONE"
   }
}&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Sep 2017 23:52:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-create-this-json-output-using-tJSONDoc/m-p/2259372#M40872</guid>
      <dc:creator>rsmits</dc:creator>
      <dc:date>2017-09-27T23:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to create this json output using tJSONDoc</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-create-this-json-output-using-tJSONDoc/m-p/2259373#M40873</link>
      <description>&lt;P&gt;Hi, this is pretty easy!&lt;/P&gt;&lt;P&gt;You have the actual object for die "value" attribute somewhere prepared.&lt;/P&gt;&lt;P&gt;You can always send a JSON as String (in your previous posts it looks like you have it this way) and you can activate in the tJSONDocOutput the option "Is a JSON object" (in the&amp;nbsp;attributes configuration) and this will cause the String value will be taken as real JSON and not set as textual value.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2017 00:01:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-create-this-json-output-using-tJSONDoc/m-p/2259373#M40873</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-28T00:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to create this json output using tJSONDoc</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-create-this-json-output-using-tJSONDoc/m-p/2259374#M40874</link>
      <description>&lt;P&gt;Hi Hans,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Everything worked out! I have added an howto to my &lt;A href="http://talendhowto.com/2017/10/22/how-to-built-a-json-string-with-arrays/" target="_blank" rel="nofollow noopener noreferrer"&gt;TalendHowTo&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thnx!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Remco&lt;/P&gt;</description>
      <pubDate>Sun, 22 Oct 2017 19:27:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-create-this-json-output-using-tJSONDoc/m-p/2259374#M40874</guid>
      <dc:creator>rsmits</dc:creator>
      <dc:date>2017-10-22T19:27:48Z</dc:date>
    </item>
  </channel>
</rss>

