Forum Discussion
It can be achieve this through Velocity Template.
In the JSON Generator snap you can put the template of your choice and refer the field names from the upstream.
Sample
[
{
“rootdoc”:
{
“fieldname1”:$value
}
}
]
Thanks for the response.
If I do your suggestion, the output would be:
[
{
“rootdoc”:
{
“fieldname1”:VALUE1
}
},
{
“rootdoc”:
{
“fieldname1”:VALUE2
}
}]
But, I would rather want the following output:
[
{
“rootdoc”:
[{
“fieldname1”:VALUE1
},
{
“fieldname1”:VALUE2
}]
}]