Reputation:
I need to fetch the second attribute from a json file. and have tried to use 'evaluateJsonPath' processor and/or 'attributetoJson' processor, in both of which case i always get the whole line instead of single attribute.
in the json processor I added the property as 'bouncers_mobile_social' and value as '$.bouncers_mobile_social' yet getting the full line.
the sample json is {"mtimespent_other": 0.4, "bouncers_mobile_social": 45, "numvisitors_mobile_search": 647}
Please suggest
Upvotes: 0
Views: 237
Reputation: 14194
I created a template demonstrating that a GenerateFlowFile
processor which creates the JSON you provided and is passed to an EvaluateJSONPath
processor with the property you provided works. Please check the configuration, typos, unexpected input data, etc.
Upvotes: 2