Re: How to iterate through complex JSON objects.

2015-12-16 Thread Matthew Burgess
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

Re: How to iterate through complex JSON objects.

2015-12-16 Thread Igor Kravzov
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

Re: How to iterate through complex JSON objects.

2015-12-16 Thread Joe Witt
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. >>

Re: How to iterate through complex JSON objects.

2015-12-15 Thread Bryan Bende
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. > > > > --

Re: How to iterate through complex JSON objects.

2015-12-15 Thread shweta
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.

Re: How to iterate through complex JSON objects.

2015-12-14 Thread shweta
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

How to iterate through complex JSON objects.

2015-12-14 Thread shweta
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.

Re: How to iterate through complex JSON objects.

2015-12-14 Thread Joe Percivall
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.