<?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: tRestClient Parsing JSON with multiple loop elements in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tRestClient-Parsing-JSON-with-multiple-loop-elements/m-p/2282936#M56980</link>
    <description>Hi Shong,
&lt;BR /&gt;Thank you for getting back to me.
&lt;BR /&gt;What is the best method to join up the multiple tExtractJSONFields?
&lt;BR /&gt;I have tried using tMap, tXMLMap, tJoin and tWriteXMLField but I am only able to join one of the tExtractJSONFields to these components.
&lt;BR /&gt;Thanks&amp;nbsp;
&lt;BR /&gt;Kieran</description>
    <pubDate>Fri, 10 Mar 2017 13:54:35 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-03-10T13:54:35Z</dc:date>
    <item>
      <title>tRestClient Parsing JSON with multiple loop elements</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tRestClient-Parsing-JSON-with-multiple-loop-elements/m-p/2282934#M56978</link>
      <description>Hi, 
&lt;BR /&gt;I am using TOS 6.1.1 to call a Rest API to extract a JSON response. This response has multiple loop elements and is output within the string field from the tRestRequest 
&lt;BR /&gt;In the response there are three arrays, Order, Item &amp;amp; Payment. I need to parse this response and generate an xml file which iterates on the multiple Item nodes (Payment is not needed for now), but also being grouped on the ESPOrderNo field. 
&lt;BR /&gt;The number of item nodes is an unknown. 
&lt;BR /&gt;I have tried using tExtractJSONField component both looping on OutgoingOrders.Order (this created one order in the xml, but with one item record) and "OutgoingOrders.Order.OrderItems.Item" (this created one xml file per item) 
&lt;BR /&gt;Please can some advise be given on how to parse JSON where there are multiple loop elements that need to be handled. 
&lt;BR /&gt;The output JSON is: 
&lt;BR /&gt;{ 
&lt;BR /&gt;&amp;nbsp; "responseStatus": "OK", 
&lt;BR /&gt;&amp;nbsp; "responseMessage": null, 
&lt;BR /&gt;&amp;nbsp; "timestamp": "2017-03-06T13:51:41+0000", 
&lt;BR /&gt;&amp;nbsp; "OutgoingOrders": { 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; "Order": 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }, 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "CurrencyCode": "", 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "CourierProfileName": "", 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "OrderItems": { 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "Item": 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }, 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "BuyerId": "", 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "OrderStatus": "", 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "CourierName": "", 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "CourierService": "", 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "CourierServiceCode": "", 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "FulfilmentType": "" 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; } 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; ] 
&lt;BR /&gt;&amp;nbsp; }, 
&lt;BR /&gt;&amp;nbsp; "PaginationResult": { 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; "TotalNumberOfPages": 1, 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; "TotalNumberOfEntries": 1 
&lt;BR /&gt;&amp;nbsp; } 
&lt;BR /&gt;}</description>
      <pubDate>Tue, 07 Mar 2017 10:33:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tRestClient-Parsing-JSON-with-multiple-loop-elements/m-p/2282934#M56978</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-07T10:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: tRestClient Parsing JSON with multiple loop elements</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tRestClient-Parsing-JSON-with-multiple-loop-elements/m-p/2282935#M56979</link>
      <description>Hi&amp;nbsp;
&lt;BR /&gt;Using multiple tExtractJsonField components to parse each loop element, join the records back if needed. eg:
&lt;BR /&gt;tRestClient--main--treplicate--main--tExtractJsonField1....
&lt;BR /&gt;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp;-main--tExtractJsonField2....
&lt;BR /&gt;&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; &amp;nbsp; &amp;nbsp; -main--tExtractJsonField1....
&lt;BR /&gt;Regards
&lt;BR /&gt;Shong</description>
      <pubDate>Fri, 10 Mar 2017 04:32:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tRestClient-Parsing-JSON-with-multiple-loop-elements/m-p/2282935#M56979</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-10T04:32:19Z</dc:date>
    </item>
    <item>
      <title>Re: tRestClient Parsing JSON with multiple loop elements</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tRestClient-Parsing-JSON-with-multiple-loop-elements/m-p/2282936#M56980</link>
      <description>Hi Shong,
&lt;BR /&gt;Thank you for getting back to me.
&lt;BR /&gt;What is the best method to join up the multiple tExtractJSONFields?
&lt;BR /&gt;I have tried using tMap, tXMLMap, tJoin and tWriteXMLField but I am only able to join one of the tExtractJSONFields to these components.
&lt;BR /&gt;Thanks&amp;nbsp;
&lt;BR /&gt;Kieran</description>
      <pubDate>Fri, 10 Mar 2017 13:54:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tRestClient-Parsing-JSON-with-multiple-loop-elements/m-p/2282936#M56980</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-10T13:54:35Z</dc:date>
    </item>
  </channel>
</rss>

