Nifi queryrecord compare regex using rpath on first level of record

21 Views Asked by At

In NiFi, my flowfile data looks like:

[{
    "name": "abc-def",
    "id": 1
},{
    "name": "xyz-def",
    "id": 2
}]

I am trying to filter records using regex. But I can't use RPATH condition on first level of attribues. This is what I've tried but not worked:

select name, id from FLOWFILE where RPATH(FLOWFILE, '/name[matchesRegex(., '<some regex>'))

How can I use RPATH or record path functions on first level of attributes(not the nested one)?

0

There are 0 best solutions below