Why is my output being divided into two operations?

When I get the busy times from google calender I want them as a json output like this {
“busy”: [
{
“start”: “2024-04-10T08:00:00”,
“end”: “2024-04-10T12:00:00”
},
{
“start”: “2024-04-10T14:00:00”,
“end”: “2024-04-10T18:00:00”
}
]
}

But I’m getting two seperate json strings. What am I doing wrong?



This is because you are using an Array Iterator to split them into two bundles.

You should be using an Aggregator somewhere before or after your Create JSON. You might not even need a Create JSON if you use the right aggregator.

Every result (item/record) from an Iterator module will output a bundle. To “combine” them into a single structure, you’ll need to use an aggregator of some sort.

Aggregators are modules that accumulate multiple bundles into one single bundle. An example of a commonly-used aggregator module is the Array aggregator module. The next popular aggregator is the Text Aggregator which is very flexible and has applies to many use-cases.

2 Likes