Help sending arrays in webhook response

My goal is to capture nested arrays from my API responses and send them in a webhook response.

I get parsed json from each API call, but when I send them in the webhook response it returns a value like:

[
{
“json”: “[Collection], [Collection], [Collection], [Collection], [Collection]”
}
]

How could I grab these values as arrays and submit them in my webhook? It seems like any attempt that data shows as empty or as [Collection]s


Screenshot 2023-11-21 at 4.38.43 PM

Hi @sean,

You could probably pass each of them through a JSON Transform to JSON module, but there’s probably an easier way depending on how the rest of your scenario works.

Possibly you could use a JSON aggregator before Webhooks module and build the entire Body in the JSON Aggregator? Just need to define the correct structure.

4 Likes

Thanks Donald – I was able to do this with JSON Transform. I needed to use one module for each of my 3 API responses in my module, but would love to eventually find a way to simply.

2 Likes

Depending on the modules your data came from, some allow JSON pass-through which means it won’t parse the output. If you have that option you might be able to use JSON aggregator.

Would have to experiment with it!

1 Like