Creating nested JSON
Hi,
I have a requirement with input data as: {"field1":"xyz","field2":"xyz2","field3":"xyz3", "field4":"xyz4"}
I need the output data as below: {"Data":{"field1":"xyz","field2":"xyz2","field3":"xyz3"},"field4":"xyz4"} to load into MongoDB.
Please suggest whether to use Data Generator or JSON Generator or custom Groovy code will be useful to create a nested JSON object
Hi! What's the criteria for leaving out "field4" in your example?
Hi, I have a classification for nested object which only need field1, field2 and field3. If we can do only with all the fields, I can separate field4 later using a processor like field merger.
Are the field names actually "field1", "field2"...?
We have a business names for these columns...just for generalization named it as field1, field2