<?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>question Re: Return a scalar value with EvaluateJSONPath processor in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Return-a-scalar-value-with-EvaluateJSONPath-processor/m-p/354786#M236987</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381"&gt;@SAMSAL&lt;/a&gt;, I was tracking that previous post but since it was so old I was hoping newer versions of NiFi could address this.&amp;nbsp; This is such a simple thing with XML and the EvaluateXPath processor, I am just surprised that we can't do something similar with JSON.&amp;nbsp; Oh well, 2 processors it is.&lt;/P&gt;</description>
    <pubDate>Thu, 13 Oct 2022 15:52:13 GMT</pubDate>
    <dc:creator>ChuckE</dc:creator>
    <dc:date>2022-10-13T15:52:13Z</dc:date>
    <item>
      <title>Return a scalar value with EvaluateJSONPath processor</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Return-a-scalar-value-with-EvaluateJSONPath-processor/m-p/354701#M236958</link>
      <description>&lt;P&gt;I need to use wildcard syntax in a JSON path to return the color of the bike as a scalar value.&amp;nbsp; However, the problem is that when I use wildcard syntax with the EvaluateJSONPath processor it always returns an array.&amp;nbsp; For example&lt;/P&gt;&lt;P&gt;This path returns a scalar value:&amp;nbsp; &amp;nbsp; &amp;nbsp;$.store.bicycle.color&amp;nbsp; &amp;nbsp;==&amp;gt;&amp;nbsp; red&lt;/P&gt;&lt;P&gt;This path returns an array:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $..bicycle.color&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;==&amp;gt; ['red']&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to use the EvaluateJSONPath processor with wildcards and get a scalar value in return?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or, is it possible to extract the value from the array without using an additional processor?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
    "store": {
        "bicycle": {
            "color": "red",
            "price": 19.95
        }
    },
    "expensive": 10
}
                        &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 01:17:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Return-a-scalar-value-with-EvaluateJSONPath-processor/m-p/354701#M236958</guid>
      <dc:creator>ChuckE</dc:creator>
      <dc:date>2022-10-13T01:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: Return a scalar value with EvaluateJSONPath processor</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Return-a-scalar-value-with-EvaluateJSONPath-processor/m-p/354767#M236979</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I dont think there is a way to do that in one processor, check out this post around the problem with possible solution:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/t5/Support-Questions/Unable-to-return-a-scalar-value-for-the-expression-from-NIFI/td-p/213677" target="_blank"&gt;https://community.cloudera.com/t5/Support-Questions/Unable-to-return-a-scalar-value-for-the-expression-from-NIFI/td-p/213677&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you find this helpful please accept solution.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 13:11:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Return-a-scalar-value-with-EvaluateJSONPath-processor/m-p/354767#M236979</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2022-10-13T13:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: Return a scalar value with EvaluateJSONPath processor</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Return-a-scalar-value-with-EvaluateJSONPath-processor/m-p/354786#M236987</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381"&gt;@SAMSAL&lt;/a&gt;, I was tracking that previous post but since it was so old I was hoping newer versions of NiFi could address this.&amp;nbsp; This is such a simple thing with XML and the EvaluateXPath processor, I am just surprised that we can't do something similar with JSON.&amp;nbsp; Oh well, 2 processors it is.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 15:52:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Return-a-scalar-value-with-EvaluateJSONPath-processor/m-p/354786#M236987</guid>
      <dc:creator>ChuckE</dc:creator>
      <dc:date>2022-10-13T15:52:13Z</dc:date>
    </item>
  </channel>
</rss>

