I am trying do a simple conversion of a one http request payload, received through a webhook block, into a differently formatted http request payload that is sent from an http block.
The incoming payload has a field which holds an Array of Collections, where each collection can have different structure. If I try to add that field as the value in my custom format in the HTTP block, it beaks the JSON formatting and the request content looks like:
{
"event_type":"custom_event",
"payload":{
"name": "Hello",
"custom_fields":{[Collection], [Collection], [Collection]}
}
}
How can I achieve a request where the collections are “unpacked” as individual JSON blobs?
{
"event_type":"custom_event",
"payload":{
"name": "Hello",
"custom_fields":[
{"key":"value","key":"value",...},
{"key":"value","key":"value",...},
{"key":"value","key":"value",...}
]
}
}