Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

How to extract json array using EvaluateJsonPath processor in NiFi?

avatar
Rising Star

Hi,

I have json flowfile,  [{"prediction":"Test2"},{"prediction":"Test2"}].

 

I am want extract the 1st part of the array ie prediction":"Test2  my destination is flowfile-attribute using EvaluateJsonPath .

 

I have added a custom attribute mlresult --->$.prediction[0], to extract the "Test2" into mlresult, but I am getting empty string  for the mlresults for the flow file attribute section.

 

flow file : [{"prediction":"Test2"},{"prediction":"Test2"}]

EvaluateJsonPath configuration:

 

mlresult.PNG

 
 

 

 

How to get the value(only one)  Test2 to mlresult?

 

Thanks

--Murali

 

 

 

1 ACCEPTED SOLUTION

avatar
Master Collaborator
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
1 REPLY 1

avatar
Master Collaborator
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login