Support Questions

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

Problem with EvaluateJsonPath

avatar

I'm really struggling not understanding what the heck is going on with EvaluateJsonPath.

Here is the JSON:

[
{
"name": "garyDawgJson"
}
]

Here is the flow:

92883-main.jpgmain.jpg(61.7 kB)

92883-main.jpg

Here is the EvaluateJsonPath:

json.jpg(32.9 kB)

When I look in the Data Provenance, the "thename" attribute never gets set.

92885-event.jpg

92885-event.jpgevent.jpg(35.9 kB)

What the heck is going on?

Thanks, Gary

92884-json.jpg

2 REPLIES 2

avatar
Master Guru

@Gary Mullen-Schultz

You are having array of json and trying to extract name value as attribute to the flowfile.

Configure EvaluateJsonPath processor as below:

92886-screen-shot-2018-10-16-at-54145-pm.png

thename

$.[0].name

So by using above path we are navigate array and extracting name value.

Correct way of doing this is..

Use SplitJson processor

Configure processor as

$.*

Using splitjson processor we are splitting json array into individual flowfiles..

then use EvaluateJsonPath processor add new property as

thename

$.name

-

If the Answer helped to resolve your issue, Click on Accept button below to accept the answer, That would be great help to Community users to find solution quickly for these kind of issues.

avatar

Stu:

Thanks, that was it! I couldn't find that in my Google searches.

Appreciate the help!

Gary