<?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: [resolved] tExtractJSONFields and List in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-tExtractJSONFields-and-List/m-p/2210825#M9099</link>
    <description>What I have to set in&amp;nbsp;&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;tExtractJSONFields&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;to get following result&lt;BR /&gt;&lt;PRE&gt;DATE_____&amp;nbsp;&amp;nbsp;| CODE___&amp;nbsp; | REQUESTS&lt;BR /&gt;2016-08-20 | CODE-A20 | 45&lt;BR /&gt;2016-07-15 | CODE-B40 | 60&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;from following JSON&lt;BR /&gt;&lt;PRE&gt;{&lt;BR /&gt; "aaa": "bbb",&lt;BR /&gt; "headers": ,&lt;BR /&gt; "rows": ,&lt;BR /&gt; &amp;nbsp;&lt;BR /&gt;}&lt;/PRE&gt;</description>
    <pubDate>Fri, 30 Sep 2016 19:14:43 GMT</pubDate>
    <dc:creator>_AnonymousUser</dc:creator>
    <dc:date>2016-09-30T19:14:43Z</dc:date>
    <item>
      <title>[resolved] tExtractJSONFields and List</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tExtractJSONFields-and-List/m-p/2210816#M9090</link>
      <description>Hi,
&lt;BR /&gt;I'm new to Talend and using Talend Open Studio for Big Data.
&lt;BR /&gt;I have a problem extracting datas from a JSON.
&lt;BR /&gt;The JSON has a double list :
&lt;BR /&gt;client : {
&lt;BR /&gt;}]
&lt;BR /&gt;I would like to have an output with as many rows as client like :
&lt;BR /&gt;name_client : String
&lt;BR /&gt;stuff : list
&lt;BR /&gt;I am using tExtractJSONFIELDS, and have an input with the regular number of client but...I can only get the first couple (name_stuff, value_stuff). I can't get all the list.
&lt;BR /&gt;Do you have any answer for the XPath request I should made to configure the line "stuff"? 
&lt;BR /&gt;Thanks.</description>
      <pubDate>Wed, 04 Dec 2013 16:56:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tExtractJSONFields-and-List/m-p/2210816#M9090</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-12-04T16:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tExtractJSONFields and List</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tExtractJSONFields-and-List/m-p/2210817#M9091</link>
      <description>Hi Largo
&lt;BR /&gt;Please give us an real example with some data, and what are your expected result?
&lt;BR /&gt;Shong</description>
      <pubDate>Sun, 08 Dec 2013 09:04:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tExtractJSONFields-and-List/m-p/2210817#M9091</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-12-08T09:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tExtractJSONFields and List</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tExtractJSONFields-and-List/m-p/2210818#M9092</link>
      <description>I'm having the same problem. I have an array in a JSON object returned from a tHttpRequest component and I'm unable to retrieve the values from inside it. 
&lt;BR /&gt;{"results":}, 
&lt;BR /&gt;{"seq":3,"id":"_design/configuration","changes":}, 
&lt;BR /&gt;{"seq":4,"id":"_design/country","changes":}, 
&lt;BR /&gt;{"seq":5,"id":"56e675fc334b9cb6d3ba7c65c300028f","changes":}, 
&lt;BR /&gt;{"seq":6,"id":"56e675fc334b9cb6d3ba7c65c3000fa2","changes":}, 
&lt;BR /&gt;{"seq":7,"id":"56e675fc334b9cb6d3ba7c65c300150f","changes":}, 
&lt;BR /&gt;{"seq":8,"id":"8ac4ff70c61b8f74b054a8c3510003ee","changes":}, 
&lt;BR /&gt;{"seq":9,"id":"8ac4ff70c61b8f74b054a8c351000911","changes":}, 
&lt;BR /&gt;{"seq":10,"id":"8ac4ff70c61b8f74b054a8c351001035","changes":}, 
&lt;BR /&gt;{"seq":11,"id":"8ac4ff70c61b8f74b054a8c3510012ec","changes":}, 
&lt;BR /&gt;{"seq":12,"id":"8ac4ff70c61b8f74b054a8c351001f20","changes":}, 
&lt;BR /&gt;{"seq":13,"id":"8ac4ff70c61b8f74b054a8c35100212b","changes":}, 
&lt;BR /&gt;{"seq":14,"id":"_design/key_alias","changes":}, 
&lt;BR /&gt;{"seq":15,"id":"test","changes":}, 
&lt;BR /&gt;{"seq":16,"id":"test2","changes":}, 
&lt;BR /&gt;{"seq":17,"id":"test3","changes":}, 
&lt;BR /&gt;{"seq":18,"id":"test4","changes":}, 
&lt;BR /&gt;{"seq":19,"id":"test5","changes":}, 
&lt;BR /&gt;{"seq":20,"id":"test6","changes":}, 
&lt;BR /&gt;{"seq":21,"id":"test7","changes":}, 
&lt;BR /&gt;{"seq":22,"id":"df05251c5b19404bab9c9cd0cc00220b","changes":}, 
&lt;BR /&gt;{"seq":23,"id":"partner","changes":}, 
&lt;BR /&gt;{"seq":24,"id":"partner2","changes":}, 
&lt;BR /&gt;{"seq":25,"id":"partner3","changes":}, 
&lt;BR /&gt;{"seq":27,"id":"test8","changes":}, 
&lt;BR /&gt;{"seq":28,"id":"test9","changes":}, 
&lt;BR /&gt;{"seq":29,"id":"test10","changes":}, 
&lt;BR /&gt;{"seq":30,"id":"test11","changes":}, 
&lt;BR /&gt;{"seq":31,"id":"test12","changes":}, 
&lt;BR /&gt;{"seq":35,"id":"_design/auth","changes":}, 
&lt;BR /&gt;{"seq":42,"id":"_design/amount","changes":}, 
&lt;BR /&gt;{"seq":43,"id":"087bfebda8ff11f7651360f8e4000020","changes":} 
&lt;BR /&gt;], 
&lt;BR /&gt;"last_seq":43} 
&lt;BR /&gt; 
&lt;BR /&gt;I'm trying to get one row for each index inside "results" and extract "rev" value from the first element in the "changes" node. I'm using the tExtractJSONFields component and I've tried all the combinations I can think of in the loop xpath and the mapping xpath queries. I would expect the queries to be something like: 
&lt;BR /&gt;Loop XPath query = "results 
&lt;BR /&gt;Mapping: Column = rev 
&lt;BR /&gt; XPath query = "changes/rev" 
&lt;BR /&gt;Any help or ideas anyone could provide would be appreciated. 
&lt;BR /&gt; 
&lt;BR /&gt;Thanks, 
&lt;BR /&gt;Curtis Jones</description>
      <pubDate>Fri, 13 Dec 2013 21:39:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tExtractJSONFields-and-List/m-p/2210818#M9092</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-12-13T21:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tExtractJSONFields and List</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tExtractJSONFields-and-List/m-p/2210819#M9093</link>
      <description>Hi Curtis 
&lt;BR /&gt;Set Loop Xpath query as "/results", and then you are able to extract values from the elements: seq, id, rev, for more details, please see my screenshots. 
&lt;BR /&gt;Shong 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MBvC.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157659iCD1E453B949446C6/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MBvC.png" alt="0683p000009MBvC.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Tue, 17 Dec 2013 03:04:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tExtractJSONFields-and-List/m-p/2210819#M9093</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-12-17T03:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tExtractJSONFields and List</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tExtractJSONFields-and-List/m-p/2210820#M9094</link>
      <description>That's perfect. Thanks for your help.</description>
      <pubDate>Tue, 17 Dec 2013 19:10:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tExtractJSONFields-and-List/m-p/2210820#M9094</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-12-17T19:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tExtractJSONFields and List</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tExtractJSONFields-and-List/m-p/2210821#M9095</link>
      <description>The problem is not solved !&lt;BR /&gt;The question was about a loop inside a loop...&lt;BR /&gt;&lt;BR /&gt;Well, as you said, we have to use the loop Xpath query to deal with the first loop.&lt;BR /&gt;We can create a column to contain the JSON code of the child loop. =&amp;gt; don't forget to check the "get nodes" option&lt;BR /&gt;And this column can be transformed with a second tExtractJSONFileds.&lt;BR /&gt;The problem is that the component only extracts the first element of the child loop. &lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;The input is: &lt;BR /&gt;{"contacts":},{"lastname":"simpson","firstname":"homer","passions":}]}&lt;BR /&gt;So we configure the tExtractJSONFileds as follows:&lt;BR /&gt;loop xpath  query = "/contacts"&lt;BR /&gt;schema:&lt;BR /&gt;lastname = "./lastname"&lt;BR /&gt;firstname = "./firstname"&lt;BR /&gt;passions = "./passions" (get nodes !)&lt;BR /&gt;The result is:&lt;BR /&gt;simpson|bart|{passions":{"object":"skating","descr":"see the credits"}}&lt;BR /&gt;simpson|homer|{passions":{"object":"donuts","descr":"favourite food"}}&lt;BR /&gt;As you can see, the second passion is missing.&lt;BR /&gt;&lt;BR /&gt;Do I miss something in the configuration ? or is there a bug in the component ?&lt;BR /&gt;Best regards,&lt;BR /&gt;Samuel</description>
      <pubDate>Tue, 21 Jan 2014 15:19:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tExtractJSONFields-and-List/m-p/2210821#M9095</guid>
      <dc:creator>bi-dev-1</dc:creator>
      <dc:date>2014-01-21T15:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tExtractJSONFields and List</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tExtractJSONFields-and-List/m-p/2210822#M9096</link>
      <description>Hi Samuel 
&lt;BR /&gt;You can extract all values with only one tExtractJsonField component by setting the Loop Xpath query as "/contacts/passions", see my screenshot. 
&lt;BR /&gt;Shong 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MC2u.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157292i20C14C80889C77A4/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MC2u.png" alt="0683p000009MC2u.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Mon, 24 Feb 2014 05:19:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tExtractJSONFields-and-List/m-p/2210822#M9096</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-24T05:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tExtractJSONFields and List</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tExtractJSONFields-and-List/m-p/2210823#M9097</link>
      <description>Yes, but you can't do it if you have more than one array to iterate over. You need to get the node and use another ExtractJSON component to do it.</description>
      <pubDate>Mon, 02 Jun 2014 08:34:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tExtractJSONFields-and-List/m-p/2210823#M9097</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-06-02T08:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tExtractJSONFields and List</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tExtractJSONFields-and-List/m-p/2210824#M9098</link>
      <description>Hello - I am running into a similar problem. &amp;nbsp;I'm using TOS DI 5.5.1. &amp;nbsp;I've tried Shong's suggestion but I am still getting "Cannot determine next state" &amp;nbsp;I am including the JSON which comes from a tRest component (and validates at jsonlint.com) and a screen shot of my tExtractJSONFields component. &amp;nbsp;Would you please help? 
  &lt;BR /&gt;{ 
  &lt;BR /&gt;&amp;nbsp; "lists": 
  &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ], 
  &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "internalListId": 1 
  &lt;BR /&gt;&amp;nbsp; &amp;nbsp; }, 
  &lt;BR /&gt;&amp;nbsp; &amp;nbsp; { 
  &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "name": "HubSpot-HootSuite App", 
  &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "metaData": { 
  &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "size": 4, 
  &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "error": "", 
  &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "processing": "DONE", 
  &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "lastSizeChangeAt": 1418738702960, 
  &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "lastProcessingStateChangeAt": 1336673990262 
  &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }, &amp;nbsp; &amp;nbsp; &amp;nbsp; "dynamic": false, &amp;nbsp; &amp;amp;nb
 &lt;BR /&gt;&lt;BR /&gt;To see the whole post, download it &lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009MdDG"&gt;here&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009MdDG"&gt;OriginalPost.pdf&lt;/A&gt;</description>
      <pubDate>Tue, 13 Jan 2015 22:59:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tExtractJSONFields-and-List/m-p/2210824#M9098</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-13T22:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tExtractJSONFields and List</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tExtractJSONFields-and-List/m-p/2210825#M9099</link>
      <description>What I have to set in&amp;nbsp;&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;tExtractJSONFields&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;to get following result&lt;BR /&gt;&lt;PRE&gt;DATE_____&amp;nbsp;&amp;nbsp;| CODE___&amp;nbsp; | REQUESTS&lt;BR /&gt;2016-08-20 | CODE-A20 | 45&lt;BR /&gt;2016-07-15 | CODE-B40 | 60&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;from following JSON&lt;BR /&gt;&lt;PRE&gt;{&lt;BR /&gt; "aaa": "bbb",&lt;BR /&gt; "headers": ,&lt;BR /&gt; "rows": ,&lt;BR /&gt; &amp;nbsp;&lt;BR /&gt;}&lt;/PRE&gt;</description>
      <pubDate>Fri, 30 Sep 2016 19:14:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tExtractJSONFields-and-List/m-p/2210825#M9099</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2016-09-30T19:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tExtractJSONFields and List</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tExtractJSONFields-and-List/m-p/2210826#M9100</link>
      <description>Hey, are able to get the result what you want ???</description>
      <pubDate>Sun, 08 Jul 2018 14:17:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tExtractJSONFields-and-List/m-p/2210826#M9100</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-08T14:17:34Z</dc:date>
    </item>
  </channel>
</rss>

