<?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 Nifi Jsonpathreader is unable to extract the json array value on matched string in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Jsonpathreader-is-unable-to-extract-the-json-array/m-p/390511#M247283</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I am facing the issue, while trying to fetch the value from jsonpathreader with avroschema attributes as below.&lt;/P&gt;&lt;P&gt;json reading from avro schema with jsonpathreader, and want to fetch home number with expression&amp;nbsp;$.phoneNumbers[?(@.type=="home")].number. However, it is getting failed.&lt;/P&gt;&lt;P&gt;Please help on this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{
  "firstName": "John",
  "lastName": "Smith",
  "isAlive": true,
  "age": 25,
  "address": {
    "streetAddress": "21 2nd Street",
    "city": "New York",
    "state": "NY",
    "postalCode": "10021-3100"
  },
  "phoneNumbers": [
    {
      "type": "home",
      "number": "212 555-1234"
    },
    {
      "type": "office",
      "number": "646 555-4567"
    }
  ],
  "children": [],
  "spouse": null
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jul 2024 16:48:28 GMT</pubDate>
    <dc:creator>Kondaji</dc:creator>
    <dc:date>2024-07-17T16:48:28Z</dc:date>
    <item>
      <title>Nifi Jsonpathreader is unable to extract the json array value on matched string</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Jsonpathreader-is-unable-to-extract-the-json-array/m-p/390511#M247283</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I am facing the issue, while trying to fetch the value from jsonpathreader with avroschema attributes as below.&lt;/P&gt;&lt;P&gt;json reading from avro schema with jsonpathreader, and want to fetch home number with expression&amp;nbsp;$.phoneNumbers[?(@.type=="home")].number. However, it is getting failed.&lt;/P&gt;&lt;P&gt;Please help on this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{
  "firstName": "John",
  "lastName": "Smith",
  "isAlive": true,
  "age": 25,
  "address": {
    "streetAddress": "21 2nd Street",
    "city": "New York",
    "state": "NY",
    "postalCode": "10021-3100"
  },
  "phoneNumbers": [
    {
      "type": "home",
      "number": "212 555-1234"
    },
    {
      "type": "office",
      "number": "646 555-4567"
    }
  ],
  "children": [],
  "spouse": null
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2024 16:48:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Jsonpathreader-is-unable-to-extract-the-json-array/m-p/390511#M247283</guid>
      <dc:creator>Kondaji</dc:creator>
      <dc:date>2024-07-17T16:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi Jsonpathreader is unable to extract the json array value on matched string</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-Jsonpathreader-is-unable-to-extract-the-json-array/m-p/391526#M247656</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/111454"&gt;@Kondaji&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I am facing the issue, while trying to fetch the value from jsonpathreader with avroschema attributes as below.&lt;/P&gt;&lt;P&gt;json reading from avro schema with jsonpathreader, and want to fetch home number with expression&amp;nbsp;$.phoneNumbers[?(@.type=="home")].number. However, it is getting failed.&amp;nbsp;&lt;A href="https://www.gm-socrates.com" target="_blank" rel="noopener"&gt;&lt;FONT size="1 2 3 4 5 6 7" color="#FFFFFF"&gt;Socrates GM&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Please help on this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{
  "firstName": "John",
  "lastName": "Smith",
  "isAlive": true,
  "age": 25,
  "address": {
    "streetAddress": "21 2nd Street",
    "city": "New York",
    "state": "NY",
    "postalCode": "10021-3100"
  },
  "phoneNumbers": [
    {
      "type": "home",
      "number": "212 555-1234"
    },
    {
      "type": "office",
      "number": "646 555-4567"
    }
  ],
  "children": [],
  "spouse": null
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I understand your frustration with this issue. It seems like the JSONPath expression you’re using should work, but there might be a few things to check:&lt;/P&gt;&lt;P&gt;Ensure JSONPathReader is correctly configured: Verify that the JSONPathReader is set up properly in your NiFi flow.&lt;BR /&gt;Check the Avro Schema: Make sure the Avro schema matches the structure of your JSON data.&lt;BR /&gt;Validate JSONPath Expression: Double-check the JSONPath expression $.phoneNumbers[?(@.type=="home")].number for any syntax errors.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this will help you.&lt;BR /&gt;Best regards,&lt;BR /&gt;florence0239&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 09:10:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-Jsonpathreader-is-unable-to-extract-the-json-array/m-p/391526#M247656</guid>
      <dc:creator>florence0239</dc:creator>
      <dc:date>2024-08-08T09:10:25Z</dc:date>
    </item>
  </channel>
</rss>

