I cannot seem to get this component to generate the correct JSON.
I have followed the steps in this article to generate a batch request: https://www.kingswaysoft.com/blog/2021/04/28/Proper-Output-Handling-with-KingswaySoft-JSON-Destination-Component
I am passing rows into the component, and want to generate an object that looks like this, with the array filled with as many objects as the batch size:
{
"sites": [
{
"fullAddress": "Text here"
},
{
"fullAddress": "Text here"
}
]
}
I have configured the component as follows:
The actual request being received on the server look as follows, with each subsequent object nested inside an array, and not added as a top level object to the sites array.
{
"sites":[
{
"fullAddress":"Text here"
},
[
{
"fullAddress":"Text here"
},
[
{
"fullAddress":"Text here"
}
]
]
]
}
I've tried a few different approaches and I either recieve errors that I am generating invalid json, or I end up in this situation. Any assitance appreciated!
UPDATE: Using the standard JSON Merge with the same settings works as expected. This means I just need to split the generating of the JSON and making the HTTP request, which is a shame