I would suggest to use more convenient ways to achieve the same:

Split array into separate flow files, then use "EvaluateJsonPath" to
extract all the values into attributes (in case you know keys in advance).
If you don't know, when you can use first JoltTransformJSON, to generate
[{"name":"id","value":"10"},{"name":"info","value":"2am-3am"}.....]
then you can split such arrays and evaluateJsonPath from "name" and "value"
into ff attributes.

On Wed, Sep 5, 2018 at 9:27 AM l vic <[email protected]> wrote:

> I have json array attribute:
> mylist
> :[{"id":10,"info":"2am-3am"},{"id":11,"info":"3AM-4AM"},{"id":12,"info":"4am-5am"}]
> How can I parse it to name/value pairs in groovy script?
> Thanks,
>

Reply via email to