<?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: Behavior of the tExtractJSONFields component in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Behavior-of-the-tExtractJSONFields-component/m-p/2242381#M29231</link>
    <description>Hi, nevermind, i found my problem.
&lt;BR /&gt;Using tJSONExtract with the JSONPath setting doesn't guarantee the order, contrary to the XPATH setting. It's just annoying to use XPATH since it's not seems to be the best one for nested array in json !
&lt;BR /&gt;Thanks !</description>
    <pubDate>Mon, 12 Sep 2016 08:11:07 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-09-12T08:11:07Z</dc:date>
    <item>
      <title>Behavior of the tExtractJSONFields component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Behavior-of-the-tExtractJSONFields-component/m-p/2242379#M29229</link>
      <description>Hi, 
&lt;BR /&gt;For my process, I need to update the content of a json object, and pass along some other information to handle it later 
&lt;BR /&gt; 
&lt;PRE&gt;{ &lt;BR /&gt; &amp;nbsp; &amp;nbsp;"user" : {&lt;BR /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"lastname" : "TEST", &lt;BR /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"firstname" : "first" &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;BR /&gt; &amp;nbsp; &amp;nbsp;},&lt;BR /&gt; &amp;nbsp; &amp;nbsp;"likes" : &lt;BR /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;BR /&gt; &amp;nbsp; &amp;nbsp;]&lt;BR /&gt;}&lt;/PRE&gt; 
&lt;BR /&gt;From this example, the content that need to be update are the fields "numberOfLike", and also the array relatedPage (I want to replace the full array with an other one). 
&lt;BR /&gt;I try (without no idea how to do better) to reconstruct my object : 
&lt;BR /&gt;tExtractJSONField_1 &amp;nbsp; -- &amp;nbsp; tWriteJSONField &amp;nbsp;-- tExtractJSONField_2 
&lt;BR /&gt;In tExtractJSONField_1, I get the content of my json object that need to be reused ("user","code","name"), and pass my new field ("numberOfLike", "RelatedPages", and also my other field for further purpose) 
&lt;BR /&gt;In tWriteJSONField, I construct a new object : 
&lt;BR /&gt; 
&lt;PRE&gt;{&lt;BR /&gt;	"jsonObject" : { &lt;BR /&gt;		"user" : {&lt;BR /&gt;			"lastname" : "TEST", &lt;BR /&gt;			"firstname" : "first" &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;BR /&gt;		},&lt;BR /&gt;		"likes" : &lt;BR /&gt;			}&lt;BR /&gt;		]&lt;BR /&gt;	},&lt;BR /&gt;	"object1" : "purpose1"&lt;BR /&gt;}&lt;/PRE&gt; 
&lt;BR /&gt;In my last tExtractJSONField_2, I separate my field to get my new " 
&lt;FONT face="consolas, monaco,"&gt;jsonObject&lt;/FONT&gt;" with the new info, and the "object1". 
&lt;BR /&gt;When I put the jsonObject in my Collection, the field are not in the same order. 
&lt;BR /&gt;Is there an explanation ? Or did I miss something ? (It's just for clarity, the data are still usable). 
&lt;BR /&gt;Also, is there a better way to update the content of a json object directly in talend ? In my real case test, I have ~40 fields, and if I add some more, I'll need to modify this job just to add the content ( 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MPcz.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157233iD1A564EF62DE3BC2/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MPcz.png" alt="0683p000009MPcz.png" /&gt;&lt;/span&gt;&amp;nbsp;). 
&lt;BR /&gt;Sincerely, 
&lt;BR /&gt;Morgan</description>
      <pubDate>Thu, 08 Sep 2016 09:14:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Behavior-of-the-tExtractJSONFields-component/m-p/2242379#M29229</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-08T09:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: Behavior of the tExtractJSONFields component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Behavior-of-the-tExtractJSONFields-component/m-p/2242380#M29230</link>
      <description>Hi,&lt;BR /&gt;Could you please post &amp;nbsp;your job setting screenshots into forum?&lt;BR /&gt;Best regards&lt;BR /&gt;Sabrina</description>
      <pubDate>Mon, 12 Sep 2016 04:12:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Behavior-of-the-tExtractJSONFields-component/m-p/2242380#M29230</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-12T04:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: Behavior of the tExtractJSONFields component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Behavior-of-the-tExtractJSONFields-component/m-p/2242381#M29231</link>
      <description>Hi, nevermind, i found my problem.
&lt;BR /&gt;Using tJSONExtract with the JSONPath setting doesn't guarantee the order, contrary to the XPATH setting. It's just annoying to use XPATH since it's not seems to be the best one for nested array in json !
&lt;BR /&gt;Thanks !</description>
      <pubDate>Mon, 12 Sep 2016 08:11:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Behavior-of-the-tExtractJSONFields-component/m-p/2242381#M29231</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-12T08:11:07Z</dc:date>
    </item>
  </channel>
</rss>

