How to compare few attributes in a json file and then route if matched/unmatched using NiFi?
I have a nested json with few first level keys. I want to compare two keys before and after in that json to see if the states are matching or not. If the states match then route to update api else insert api.
What I have tried so far : getfile-->evaluate json path(to get the two keys before and after)-->route on attributes
Now my problem is that route on attributes always evaluates to unmatched even if the values in eval json path for before and after are the same.
Expression : Eval json path 1 : a_before = $.['a']['before'][*]['ip']
Eval json path 2 : a_after = $.['a']['after'][*]['ip']
Above results in the same ip - ["1.0.0.0"]
RouteOnAttribute : ${a_after:equals(${a_before})}
This always results in an unmatched even if the records match.
Any help will be appreciated.

