<?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 JSONPath syntax for tFileInputJSON in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/JSONPath-syntax-for-tFileInputJSON/m-p/2361180#M125603</link>
    <description>I am having a problem getting my JSONPAth query correct to extract complete records using tFileInputJSON 
&lt;BR /&gt;This configuration seems to work: 
&lt;BR /&gt;Mapping 
&lt;BR /&gt;Column JSONPath Query 
&lt;BR /&gt;id $..id 
&lt;BR /&gt;name $..name 
&lt;BR /&gt;.... 
&lt;BR /&gt;film_title $..customFields 
&lt;BR /&gt;HOWEVER, not every item has all customFields. 
&lt;BR /&gt;So the output record contains the next available film_title, not the film_title for that item. 
&lt;BR /&gt;I know I need to somehow extract the fields for a particular item, rather than retrieve all elements of each type as the $.. does, but unlike the XML components there seems no way of selecting a loop element. The documentation at 
&lt;A href="http://goessner.net/articles/JsonPath/" target="_blank" rel="nofollow noopener noreferrer"&gt;http://goessner.net/articles/JsonPath/&lt;/A&gt; has not helped either. 
&lt;BR /&gt;Can anyone point me in the right direction? 
&lt;BR /&gt;Thanks 
&lt;BR /&gt;JSON Sample 
&lt;BR /&gt;{ 
&lt;BR /&gt; "items": [ 
&lt;BR /&gt; { 
&lt;BR /&gt; "id": 73654804001, 
&lt;BR /&gt; "name": "Ninja Assassin - TV trailer", 
&lt;BR /&gt; "shortDescription": "From the people who brought you The Matrix ", 
&lt;BR /&gt; "longDescription": "An ultra-violent ninja odyssey about an ancient art of assassins.", 
&lt;BR /&gt; "videoStillURL": "http:\/\/media\/TV-trailer.jpg?pubId=64298585001", 
&lt;BR /&gt; "thumbnailURL": "http:\/\/media\/image.jpg?pubId=64298585001", 
&lt;BR /&gt; "referenceId": "Movies_12518899", 
&lt;BR /&gt; "customFields": { 
&lt;BR /&gt; "sub_channel": "Trailer", 
&lt;BR /&gt; "film_title": "Ninja Assassin", 
&lt;BR /&gt; "movie_genre": "Action \/ Adventure", 
&lt;BR /&gt; "release_date": "22\/01\/2010", 
&lt;BR /&gt; "actors": "Rain, Naomie Harris, Ben Miles, Sho Kosugi, Rick Yune", 
&lt;BR /&gt; "director": "James McTeigue", 
&lt;BR /&gt; "channel": "Movies" 
&lt;BR /&gt; } 
&lt;BR /&gt; }, 
&lt;BR /&gt;..................</description>
    <pubDate>Sat, 16 Nov 2024 13:27:21 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T13:27:21Z</dc:date>
    <item>
      <title>JSONPath syntax for tFileInputJSON</title>
      <link>https://community.qlik.com/t5/Talend-Studio/JSONPath-syntax-for-tFileInputJSON/m-p/2361180#M125603</link>
      <description>I am having a problem getting my JSONPAth query correct to extract complete records using tFileInputJSON 
&lt;BR /&gt;This configuration seems to work: 
&lt;BR /&gt;Mapping 
&lt;BR /&gt;Column JSONPath Query 
&lt;BR /&gt;id $..id 
&lt;BR /&gt;name $..name 
&lt;BR /&gt;.... 
&lt;BR /&gt;film_title $..customFields 
&lt;BR /&gt;HOWEVER, not every item has all customFields. 
&lt;BR /&gt;So the output record contains the next available film_title, not the film_title for that item. 
&lt;BR /&gt;I know I need to somehow extract the fields for a particular item, rather than retrieve all elements of each type as the $.. does, but unlike the XML components there seems no way of selecting a loop element. The documentation at 
&lt;A href="http://goessner.net/articles/JsonPath/" target="_blank" rel="nofollow noopener noreferrer"&gt;http://goessner.net/articles/JsonPath/&lt;/A&gt; has not helped either. 
&lt;BR /&gt;Can anyone point me in the right direction? 
&lt;BR /&gt;Thanks 
&lt;BR /&gt;JSON Sample 
&lt;BR /&gt;{ 
&lt;BR /&gt; "items": [ 
&lt;BR /&gt; { 
&lt;BR /&gt; "id": 73654804001, 
&lt;BR /&gt; "name": "Ninja Assassin - TV trailer", 
&lt;BR /&gt; "shortDescription": "From the people who brought you The Matrix ", 
&lt;BR /&gt; "longDescription": "An ultra-violent ninja odyssey about an ancient art of assassins.", 
&lt;BR /&gt; "videoStillURL": "http:\/\/media\/TV-trailer.jpg?pubId=64298585001", 
&lt;BR /&gt; "thumbnailURL": "http:\/\/media\/image.jpg?pubId=64298585001", 
&lt;BR /&gt; "referenceId": "Movies_12518899", 
&lt;BR /&gt; "customFields": { 
&lt;BR /&gt; "sub_channel": "Trailer", 
&lt;BR /&gt; "film_title": "Ninja Assassin", 
&lt;BR /&gt; "movie_genre": "Action \/ Adventure", 
&lt;BR /&gt; "release_date": "22\/01\/2010", 
&lt;BR /&gt; "actors": "Rain, Naomie Harris, Ben Miles, Sho Kosugi, Rick Yune", 
&lt;BR /&gt; "director": "James McTeigue", 
&lt;BR /&gt; "channel": "Movies" 
&lt;BR /&gt; } 
&lt;BR /&gt; }, 
&lt;BR /&gt;..................</description>
      <pubDate>Sat, 16 Nov 2024 13:27:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/JSONPath-syntax-for-tFileInputJSON/m-p/2361180#M125603</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: JSONPath syntax for tFileInputJSON</title>
      <link>https://community.qlik.com/t5/Talend-Studio/JSONPath-syntax-for-tFileInputJSON/m-p/2361181#M125604</link>
      <description>Both 
&lt;BR /&gt;$..customFields 
&lt;BR /&gt;and 
&lt;BR /&gt;$.items. 
&lt;BR /&gt;work to select the JSON array of custom fields: 
&lt;BR /&gt;{"sub_channel":"Movie shows","movie_genre":"Top 10s","show_series":"Top 10s","channel":"Movies"} 
&lt;BR /&gt;But I can't suss the syntax to extract movie_genre of "Top 10s" or film_title of "" 
&lt;BR /&gt;I haven't got the @ syntax to work for me. 
&lt;BR /&gt;The sum total of JSONPath examples on the Web is the same bookstore example. Perhaps if I knew Xpath better I would understand. 
&lt;BR /&gt;Help please - I'll keep experimenting</description>
      <pubDate>Fri, 23 Apr 2010 18:27:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/JSONPath-syntax-for-tFileInputJSON/m-p/2361181#M125604</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-23T18:27:42Z</dc:date>
    </item>
  </channel>
</rss>

