<?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>article Qlik Talend Data Integration: Using JSONPath expressions to filter JSON data in Official Support Articles</title>
    <link>https://community.qlik.com/t5/Official-Support-Articles/Qlik-Talend-Data-Integration-Using-JSONPath-expressions-to/ta-p/2151861</link>
    <description>&lt;DIV class="talend-tkb-migrated-content"&gt;
&lt;P&gt;JSON data returned from a web service often contains a single parent object, which wraps child objects or arrays. If the parent object is used directly, the response will not display any detail records.&lt;/P&gt;
&lt;P&gt;When using tExtractJSONFields to extract JSON data from a JSON string or using tFileInputJSON to read a JSON file, if the number of array elements is very large, it will take up a lot of resources. Sometimes you only need to extract JSON data that matches specific criteria, and it is more convenient to return an array of child objects instead of a parent object.&lt;/P&gt;
&lt;H3&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;Resolution&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H3&gt;
Use JSONPath expressions in the &lt;STRONG&gt;Loop Json query &lt;/STRONG&gt;field to query and filter JSON data from a JSON file.&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;Example JSON file:&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV class="talend-tkb-migrated-content"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="talend-tkb-migrated-content"&gt;&lt;LI-CODE lang="markup"&gt;{
  "array": [
    {
      "filename": "CoverLetter.docx",
      "url": "",
      "type": "cover_letter",
      "created_at": "2022-01-03T19:09:12.839Z",
      "price": 8.95
    },
    {
      "filename": "Resume1.pdf",
      "url": "",
      "type": "resume",
      "created_at": "2022-02-03T19:09:12.602Z",
      "price": 10.11
    },
    {
      "filename": "image.jpg",
      "url": "",
      "type": "image",
      "created_at": "2023-02-27T13:01:04.786Z",
      "price": 8.85
    },
       {
      "filename": "Resume2.pdf",
      "url": "",
      "type": "resume",
      "created_at": "2022-03-04T19:09:12.602Z",
      "price": 11.11
    }
  ]
}&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV class="talend-tkb-migrated-content"&gt;&lt;BR /&gt;Example 1: Filter the JSON data only when the &lt;STRONG&gt;type&lt;/STRONG&gt; is &lt;STRONG&gt;'resume'&lt;/STRONG&gt;.&lt;/DIV&gt;
&lt;DIV class="talend-tkb-migrated-content"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="talend-tkb-migrated-content"&gt;&lt;LI-CODE lang="markup"&gt;$.array[?(@.type=='resume')]&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV class="talend-tkb-migrated-content"&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="0EM5b00000AsPga.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/121626i814D1B54B0DBADE0/image-size/large?v=v2&amp;amp;px=999" role="button" title="0EM5b00000AsPga.png" alt="0EM5b00000AsPga.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;Expected result:&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="0EM5b00000AsPgp.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/121801iC27FE8F7261D195D/image-size/large?v=v2&amp;amp;px=999" role="button" title="0EM5b00000AsPgp.png" alt="0EM5b00000AsPgp.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Example 2: Filter the JSON data only when the &lt;STRONG&gt;type&lt;/STRONG&gt; is &lt;STRONG&gt;'resume'&lt;/STRONG&gt; and &lt;STRONG&gt;created_at&lt;/STRONG&gt; is &lt;STRONG&gt;&amp;lt;'2022-03-01'&lt;/STRONG&gt;.&lt;/DIV&gt;
&lt;DIV class="talend-tkb-migrated-content"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="talend-tkb-migrated-content"&gt;&lt;LI-CODE lang="markup"&gt;$.array[?(@.type=='resume'&amp;amp;&amp;amp;@.created_at&amp;lt;'2022-03-01')]&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV class="talend-tkb-migrated-content"&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="0EM5b00000AsPh4.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/122365i5BC0D64DA06C86D4/image-size/large?v=v2&amp;amp;px=999" role="button" title="0EM5b00000AsPh4.png" alt="0EM5b00000AsPh4.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;Expected result:&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="0EM5b00000AsPh9.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/123549iAE063BE4359C44DE/image-size/large?v=v2&amp;amp;px=999" role="button" title="0EM5b00000AsPh9.png" alt="0EM5b00000AsPh9.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;For more information about JSONPath syntax, see the &lt;A href="https://goessner.net/articles/JsonPath/" target="_blank" rel="noopener"&gt;JSONPath - XPath for JSON&lt;/A&gt; page on goessner.net.&lt;/DIV&gt;
&lt;DIV class="talend-tkb-migrated-content"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;H4 class="talend-tkb-migrated-content"&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;Environment&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H4&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;LI-PRODUCT title="Talend Data Integration" id="qlik_TalendDataIntegration"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;7.3.1, 8.0.1&lt;/LI&gt;
&lt;/UL&gt;</description>
    <pubDate>Tue, 14 May 2024 09:07:20 GMT</pubDate>
    <dc:creator>TalendSolutionExpert</dc:creator>
    <dc:date>2024-05-14T09:07:20Z</dc:date>
    <item>
      <title>Qlik Talend Data Integration: Using JSONPath expressions to filter JSON data</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Qlik-Talend-Data-Integration-Using-JSONPath-expressions-to/ta-p/2151861</link>
      <description>&lt;DIV class="talend-tkb-migrated-content"&gt;
&lt;P&gt;JSON data returned from a web service often contains a single parent object, which wraps child objects or arrays. If the parent object is used directly, the response will not display any detail records.&lt;/P&gt;
&lt;P&gt;When using tExtractJSONFields to extract JSON data from a JSON string or using tFileInputJSON to read a JSON file, if the number of array elements is very large, it will take up a lot of resources. Sometimes you only need to extract JSON data that matches specific criteria, and it is more convenient to return an array of child objects instead of a parent object.&lt;/P&gt;
&lt;H3&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;Resolution&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H3&gt;
Use JSONPath expressions in the &lt;STRONG&gt;Loop Json query &lt;/STRONG&gt;field to query and filter JSON data from a JSON file.&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;Example JSON file:&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV class="talend-tkb-migrated-content"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="talend-tkb-migrated-content"&gt;&lt;LI-CODE lang="markup"&gt;{
  "array": [
    {
      "filename": "CoverLetter.docx",
      "url": "",
      "type": "cover_letter",
      "created_at": "2022-01-03T19:09:12.839Z",
      "price": 8.95
    },
    {
      "filename": "Resume1.pdf",
      "url": "",
      "type": "resume",
      "created_at": "2022-02-03T19:09:12.602Z",
      "price": 10.11
    },
    {
      "filename": "image.jpg",
      "url": "",
      "type": "image",
      "created_at": "2023-02-27T13:01:04.786Z",
      "price": 8.85
    },
       {
      "filename": "Resume2.pdf",
      "url": "",
      "type": "resume",
      "created_at": "2022-03-04T19:09:12.602Z",
      "price": 11.11
    }
  ]
}&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV class="talend-tkb-migrated-content"&gt;&lt;BR /&gt;Example 1: Filter the JSON data only when the &lt;STRONG&gt;type&lt;/STRONG&gt; is &lt;STRONG&gt;'resume'&lt;/STRONG&gt;.&lt;/DIV&gt;
&lt;DIV class="talend-tkb-migrated-content"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="talend-tkb-migrated-content"&gt;&lt;LI-CODE lang="markup"&gt;$.array[?(@.type=='resume')]&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV class="talend-tkb-migrated-content"&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="0EM5b00000AsPga.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/121626i814D1B54B0DBADE0/image-size/large?v=v2&amp;amp;px=999" role="button" title="0EM5b00000AsPga.png" alt="0EM5b00000AsPga.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;Expected result:&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="0EM5b00000AsPgp.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/121801iC27FE8F7261D195D/image-size/large?v=v2&amp;amp;px=999" role="button" title="0EM5b00000AsPgp.png" alt="0EM5b00000AsPgp.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Example 2: Filter the JSON data only when the &lt;STRONG&gt;type&lt;/STRONG&gt; is &lt;STRONG&gt;'resume'&lt;/STRONG&gt; and &lt;STRONG&gt;created_at&lt;/STRONG&gt; is &lt;STRONG&gt;&amp;lt;'2022-03-01'&lt;/STRONG&gt;.&lt;/DIV&gt;
&lt;DIV class="talend-tkb-migrated-content"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="talend-tkb-migrated-content"&gt;&lt;LI-CODE lang="markup"&gt;$.array[?(@.type=='resume'&amp;amp;&amp;amp;@.created_at&amp;lt;'2022-03-01')]&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV class="talend-tkb-migrated-content"&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="0EM5b00000AsPh4.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/122365i5BC0D64DA06C86D4/image-size/large?v=v2&amp;amp;px=999" role="button" title="0EM5b00000AsPh4.png" alt="0EM5b00000AsPh4.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;Expected result:&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="0EM5b00000AsPh9.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/123549iAE063BE4359C44DE/image-size/large?v=v2&amp;amp;px=999" role="button" title="0EM5b00000AsPh9.png" alt="0EM5b00000AsPh9.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;For more information about JSONPath syntax, see the &lt;A href="https://goessner.net/articles/JsonPath/" target="_blank" rel="noopener"&gt;JSONPath - XPath for JSON&lt;/A&gt; page on goessner.net.&lt;/DIV&gt;
&lt;DIV class="talend-tkb-migrated-content"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;H4 class="talend-tkb-migrated-content"&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;Environment&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H4&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;LI-PRODUCT title="Talend Data Integration" id="qlik_TalendDataIntegration"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;7.3.1, 8.0.1&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Tue, 14 May 2024 09:07:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Qlik-Talend-Data-Integration-Using-JSONPath-expressions-to/ta-p/2151861</guid>
      <dc:creator>TalendSolutionExpert</dc:creator>
      <dc:date>2024-05-14T09:07:20Z</dc:date>
    </item>
  </channel>
</rss>

