I have the following JSON:
{
"hits": {
"hits":[]
}
}
(Some response from ElasticSearch).
I want to use the processor EvaluateJsonPath to get the length of hits.hits.
I tried the following expression:
$.hits.hits.length
But I get the following error:
FlowFile could not find path $['hits']['hits']['length'] for attribute key hits.: (That's the end of the error).
However, when checking online with JsonEvaluate sites it seems to work.
What's wrong with my expression?
It seems that there are different versions of JsonPath. For me, $.hits.hits.length() worked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With