Apache Nifi: filter recordpath on boolean fields
Hello,
I have a piece of JSON on which I want to apply an updateRecord processor using some filter capabilities. My JSON looks like this:
"status": [
{
"code": "InProgress",
"isCurrentStatus": false,
"startDateTime": "2020-03-05T20:45:00Z"
},
{
"code": "Pending",
"isCurrentStatus": true,
"startDateTime": "2020-03-05T21:20:00Z"
}
],
And my RecordPath expression is the following:
/status[0..-1][./isCurrentStatus = true]/code
This expression doesn't work and I have an error in my logs file stating about incorrect syntax: Unexpected token ']' at line 1
If I put the following syntax:
/status[0..-1][./isCurrentStatus = "true"]/code
it doesn't give anymore error, but of course the filter doesn't work. So, I have the feeling that recordPath filter doesn't support the use of boolean values.
My Nifi is Nifi 1.9.0 coming with HDF 3.4.
Any idea?
Thanks a lot,
Stéphane

