Hi - I am using Modified JavaScript value step to create json objects . I can't use JSON output step as my json structure is nested.
Now I want to dump all these individual json objects into a file into an array. Output should look like:-
[
{"id":1,"name":"John"},
{"id":2,"name":"Kumar"},
{"id":3,"name":"Maria"}
]
I went through the blog post https://diethardsteiner.github.io/pdi/2014/08/10/Pentaho-Data-Integration-Nested-JSON-Structure.html but couldn't figure out the final solution myself.
Could anyone take a look at it and help me here?
Regards,
Ritesh
Hi Ritesh.
You can use the JSON step but with a different JSON Path search string
$.*.id
$.*.name