Hi Nifi Dev Team,

We are using Evaluate Json Path Processor to parse an input json and store the 
value in a Flow Attribute.

As per the below Nifi Documentation it should work but we are not seeing the 
same behavior. The processor returns empty string if its return type is json or 
it gives an error both in auto-detect and scalar values.

Nifi Documentation Link:
https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#jsonpath

Sample example from Nifi Documentation:
${myJson:jsonPath('$.phoneNumbers[?(@.type=="home")].number')}1

212 555-1234


Tested both on Nifi version 1.4.0 and 1.2.0 and the issue is same. Below is the 
request I am trying to parse and the expression.  Any help would be much 
appreciated.

Error screenshot when return type is scalar or auto-detect:
[cid:[email protected]]

JsonPath Expression:
$.addresses[?(@.type=="Home")].city

Request JSON:
{
  "addresses": [
    {
      "type": "Legal",
      "addressLine1": "10012 lethbridge dr",
      "addressLine2": "",
      "addressLine3": "",
      "addressLine4": "",
      "state": "florida",
      "city": "orlando",
      "countryCode": "USA",
      "postalCode": "32829"
    },
    {
      "type": "Home",
      "addressLine1": "10012 lethbridge dr",
      "addressLine2": "",
      "addressLine3": "",
      "addressLine4": "",
      "state": "florida",
      "city": "orlando",
      "countryCode": "USA",
      "postalCode": "32829"
    }
  ]
}



Thanks,
Lateef
________________________________________________________

The information contained in this e-mail is confidential and/or proprietary to 
Capital One and/or its affiliates and may only be used solely in performance of 
work or services for Capital One. The information transmitted herewith is 
intended only for use by the individual or entity to which it is addressed. If 
the reader of this message is not the intended recipient, you are hereby 
notified that any review, retransmission, dissemination, distribution, copying 
or other use of, or taking of any action in reliance upon this information is 
strictly prohibited. If you have received this communication in error, please 
contact the sender and delete the material from your computer.

Reply via email to