ct approach that you told. Just
>>> that
>>> I was clueless about using Mergecontent processor. So I wrote my custom
>>> script to combine the different outputs and executed it using Execute
>>> Stream
>>> command.
>>> Will try the same with M
Mergecontent processor. So I wrote my custom
> > script to combine the different outputs and executed it using Execute
> > Stream
> > command.
> > Will try the same with Mergecontent.
> >
> >
> >
> > --
> > View this message in context:
> &g
ts and executed it using Execute
>> Stream
>> command.
>> Will try the same with Mergecontent.
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-nifi-developer-list.39713.n7.nabble.com/How-to-iterate-through-complex-JSON-objects-tp5776p5806.html
>> Sent from the Apache NiFi Developer List mailing list archive at
>> Nabble.com.
>>
va"]
> I'm just trying to figure out how I can transpose it and instead get
> something like this
>
> 2233, "testing with Java"
> 2232, "testing with Java"
> 2231, "testing with Java"
>
> to generate my desired csv.
>
>
>
> --
in context:
http://apache-nifi-developer-list.39713.n7.nabble.com/How-to-iterate-through-complex-JSON-objects-tp5776p5806.html
Sent from the Apache NiFi Developer List mailing list archive at Nabble.com.
to return a scalar value. The evaluated
value shown in exception however
is correct.
How can I store non-scalar value as flow file attributes .
Thanks,
Shweta
--
View this message in context:
http://apache-nifi-developer-list.39713.n7.nabble.com/How-to-iterate-through-complex-JSON-objects-tp5776p5789
EvaluateJSONPath and Replace Text for the same.
First issue I'm facing is in parsing an array (Tags and Body). I couldn't
figure out how can iterate over the array of JSON values.
For Simplicity sake I configured EvaluateJSONPath with values shown in the
image:-
<http://apache-nifi-developer-list.39713.n7.nabble.com/file/n5776/EvaluateJsonPath.png>
and Replace Text processor with
Regex expression as [\S\s]+ and Replacement Values as
"${Body}","${Tags},"${Post_id}","${Title}".
It works for single record.
Can you please provide pointer how to iterate through value of arrays.
Thanks,
Shweta
--
View this message in context:
http://apache-nifi-developer-list.39713.n7.nabble.com/How-to-iterate-through-complex-JSON-objects-tp5776.html
Sent from the Apache NiFi Developer List mailing list archive at Nabble.com.
ot;
"comments":[{"post_id":"2231","body":"try option1"} ,
{"post_id":"2231","body":"try option2"} , {"post_id":"2231","body":"try
option3"}
]
I need to convert the JSON to CSV.
Id Tags Title
Body
2233 , , "testing with Java" , <"try
option1"><"try option2"><"try option3">
2232 , , "testing with Java" , <"try option1"><"try
option2"><"try option3">
.
.
I used a combination of EvaluateJSONPath and Replace Text for the same.
First issue I'm facing is in parsing an array (Tags and Body). I couldn't
figure out how can iterate over the array of JSON values.
For Simplicity sake I configured EvaluateJSONPath with values shown in the
image:-
<http://apache-nifi-developer-list.39713.n7.nabble.com/file/n5776/EvaluateJsonPath.png>
and Replace Text processor with
Regex expression as [\S\s]+ and Replacement Values as
"${Body}","${Tags},"${Post_id}","${Title}".
It works for single record.
Can you please provide pointer how to iterate through value of arrays.
Thanks,
Shweta
--
View this message in context:
http://apache-nifi-developer-list.39713.n7.nabble.com/How-to-iterate-through-complex-JSON-objects-tp5776.html
Sent from the Apache NiFi Developer List mailing list archive at Nabble.com.