<?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 How to solve issues with Invalid JSONPath errors in Official Support Articles</title>
    <link>https://community.qlik.com/t5/Official-Support-Articles/How-to-solve-issues-with-Invalid-JSONPath-errors/ta-p/1856982</link>
    <description>&lt;P&gt;If you are reading this article that means you encountered this error when running one of our automations. This happens whenever you try to access the value of a key inside an object directly by name but the name either contains special characters not present in the UTF-8 format or contains special characters like empty space ' ' character, '/' character, '.' character and a few other choice characters that hold special meaning in the PHP interpreter.&lt;/P&gt;
&lt;P&gt;Workaround for this is to encase the whole key name in apostrophes '' so as to let the interpreter know exactly how to read that certain key. Renaming the key works as well but sometimes keys like this need to be sent as they are to other platforms so it might not always apply.&lt;/P&gt;
&lt;P&gt;I have attached a quick JSON example of how to workaround the issue and also how you can experience the error yourself if you enable the Output 8 block inside that automation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But let us go through the example step by step and understand this better. In the first block I created an object with two items in it both containing special character keys, restricted character keys as well as normal keys too.&lt;/P&gt;
&lt;P class="lia-align-center"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Marius_Nuca_0-1636450261382.png" style="width: 442px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/66246iD1545622659F86C6/image-dimensions/442x525?v=v2" width="442" height="525" role="button" title="Marius_Nuca_0-1636450261382.png" alt="Marius_Nuca_0-1636450261382.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to show the whole item in the output, this does not cause any issues. But if you want to use the values of special char keys like I did in the conditional block then we need to add the ''.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Marius_Nuca_1-1636450313233.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/66248iA33638A72D6F0DF7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Marius_Nuca_1-1636450313233.png" alt="Marius_Nuca_1-1636450313233.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The end result of a run for our testing automation example should be looking like the following image:&lt;/P&gt;
&lt;P class="lia-align-center"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Marius_Nuca_2-1636450692504.png" style="width: 510px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/66250iA53CBA7C93776EA4/image-dimensions/510x495?v=v2" width="510" height="495" role="button" title="Marius_Nuca_2-1636450692504.png" alt="Marius_Nuca_2-1636450692504.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P class="lia-align-left"&gt;If by any chance this solution is not working for you we have a secondary workaround and that is to treat the whole tag as a member of a list:&lt;/P&gt;
&lt;PRE class="c-mrkdwn__pre" data-stringify-type="pre"&gt;&lt;STRONG&gt;{ $.listAccounts.item['emt_labcommercialytd_date@OData.Community.Display.V1.FormattedValue'] }&lt;/STRONG&gt;&lt;/PRE&gt;
&lt;P class="lia-align-left"&gt;Hope this explanation and example helps you guys moving forward with your own automations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="font-style: italic;"&gt;The information in this article is provided as-is and to be used at own discretion. Depending on tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 12 Nov 2021 09:10:20 GMT</pubDate>
    <dc:creator>Marius_Nuca</dc:creator>
    <dc:date>2021-11-12T09:10:20Z</dc:date>
    <item>
      <title>How to solve issues with Invalid JSONPath errors</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/How-to-solve-issues-with-Invalid-JSONPath-errors/ta-p/1856982</link>
      <description>&lt;P&gt;If you are reading this article that means you encountered this error when running one of our automations. This happens whenever you try to access the value of a key inside an object directly by name but the name either contains special characters not present in the UTF-8 format or contains special characters like empty space ' ' character, '/' character, '.' character and a few other choice characters that hold special meaning in the PHP interpreter.&lt;/P&gt;
&lt;P&gt;Workaround for this is to encase the whole key name in apostrophes '' so as to let the interpreter know exactly how to read that certain key. Renaming the key works as well but sometimes keys like this need to be sent as they are to other platforms so it might not always apply.&lt;/P&gt;
&lt;P&gt;I have attached a quick JSON example of how to workaround the issue and also how you can experience the error yourself if you enable the Output 8 block inside that automation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But let us go through the example step by step and understand this better. In the first block I created an object with two items in it both containing special character keys, restricted character keys as well as normal keys too.&lt;/P&gt;
&lt;P class="lia-align-center"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Marius_Nuca_0-1636450261382.png" style="width: 442px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/66246iD1545622659F86C6/image-dimensions/442x525?v=v2" width="442" height="525" role="button" title="Marius_Nuca_0-1636450261382.png" alt="Marius_Nuca_0-1636450261382.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to show the whole item in the output, this does not cause any issues. But if you want to use the values of special char keys like I did in the conditional block then we need to add the ''.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Marius_Nuca_1-1636450313233.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/66248iA33638A72D6F0DF7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Marius_Nuca_1-1636450313233.png" alt="Marius_Nuca_1-1636450313233.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The end result of a run for our testing automation example should be looking like the following image:&lt;/P&gt;
&lt;P class="lia-align-center"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Marius_Nuca_2-1636450692504.png" style="width: 510px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/66250iA53CBA7C93776EA4/image-dimensions/510x495?v=v2" width="510" height="495" role="button" title="Marius_Nuca_2-1636450692504.png" alt="Marius_Nuca_2-1636450692504.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P class="lia-align-left"&gt;If by any chance this solution is not working for you we have a secondary workaround and that is to treat the whole tag as a member of a list:&lt;/P&gt;
&lt;PRE class="c-mrkdwn__pre" data-stringify-type="pre"&gt;&lt;STRONG&gt;{ $.listAccounts.item['emt_labcommercialytd_date@OData.Community.Display.V1.FormattedValue'] }&lt;/STRONG&gt;&lt;/PRE&gt;
&lt;P class="lia-align-left"&gt;Hope this explanation and example helps you guys moving forward with your own automations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="font-style: italic;"&gt;The information in this article is provided as-is and to be used at own discretion. Depending on tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Nov 2021 09:10:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/How-to-solve-issues-with-Invalid-JSONPath-errors/ta-p/1856982</guid>
      <dc:creator>Marius_Nuca</dc:creator>
      <dc:date>2021-11-12T09:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to solve issues with Invalid JSONPath errors</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/How-to-solve-issues-with-Invalid-JSONPath-errors/tac-p/2002877#M7724</link>
      <description>&lt;P&gt;Hi Marius, thanks for the great post, but I am still struggling with this issue:&lt;/P&gt;
&lt;P&gt;(The fields that I am trying to populate the object variable with, has a naming convention of db.64 (prefix), so it seems that Qlik thinks it is a level down if that makes sense?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bkennedy_0-1668070018680.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/93368i36152B7242E6E36C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bkennedy_0-1668070018680.png" alt="bkennedy_0-1668070018680.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is what it looks like when I select:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bkennedy_1-1668070110816.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/93369i33CAAF6E01E49563/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bkennedy_1-1668070110816.png" alt="bkennedy_1-1668070110816.png" /&gt;&lt;/span&gt;.&lt;/P&gt;
&lt;P&gt;the result the (for the Value):&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bkennedy_2-1668070163685.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/93370i06BD908937AF13CC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bkennedy_2-1668070163685.png" alt="bkennedy_2-1668070163685.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;with the following error then:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bkennedy_3-1668070196297.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/93371i17E2B0C85D91B524/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bkennedy_3-1668070196297.png" alt="bkennedy_3-1668070196297.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;I have tried {$.loop2.item.'db64.refnr'} but no luck, any ideas?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2022 08:51:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/How-to-solve-issues-with-Invalid-JSONPath-errors/tac-p/2002877#M7724</guid>
      <dc:creator>bkennedy</dc:creator>
      <dc:date>2022-11-10T08:51:19Z</dc:date>
    </item>
  </channel>
</rss>

