# Converting web hook payload array of collections into HTTP request JSON

**URL:** <https://community.make.com/t/converting-web-hook-payload-array-of-collections-into-http-request-json/5328>\
**Category:** Questions\
**Tags:** collections, arrays, webhooks, http\
**Created:** [December 1, 2022, 4:04pm UTC](https://community.make.com/t/converting-web-hook-payload-array-of-collections-into-http-request-json/5328 "2022-12-01T16:04:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kajsa](https://avatars.discourse-cdn.com/v4/letter/k/67e7ee/32.png) [@Kajsa](https://community.make.com/u/Kajsa)\
**Post date:** [December 1, 2022, 4:04pm UTC](https://community.make.com/t/converting-web-hook-payload-array-of-collections-into-http-request-json/5328/1 "2022-12-01T16:04:23Z")

</div>

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.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/2X/0/0e5d39d42caad04a7233406fe562b756785999f1.png)

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/2X/1/1b0fd0ba03503bedc398bb200afb12a87c2176dc.png)  
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:

```auto
{
  "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?

```auto
{
  "event_type":"custom_event",
  "payload":{
    "name": "Hello",
    "custom_fields":[
      {"key":"value","key":"value",...},
      {"key":"value","key":"value",...},
      {"key":"value","key":"value",...}
    ]
  }
}

```

---

<div class="post-metadata">

**Author:** ![alex.newpath](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/alex.newpath/32/84_2.png) [@alex.newpath](https://community.make.com/u/alex.newpath)\
**Post date:** [December 2, 2022, 9:04am UTC](https://community.make.com/t/converting-web-hook-payload-array-of-collections-into-http-request-json/5328/2 "2022-12-02T09:04:51Z")

</div>

Have you tried the create json app? Alternatively you can iterate the array with an iterator to create the necessary json text. [What’s the best way to combine data from multiple modules and output it in a Make An API Call module?](https://community.make.com/t/whats-the-best-way-to-combine-data-from-multiple-modules-and-output-it-in-a-make-an-api-call-module/5148)

---

<div class="post-metadata">

**Author:** ![Make\_Bot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/make_bot/32/14661_2.png) [@Make\_Bot](https://community.make.com/u/Make_Bot)\
**Post date:** [September 7, 2023, 3:08pm UTC](https://community.make.com/t/converting-web-hook-payload-array-of-collections-into-http-request-json/5328/3 "2023-09-07T15:08:24Z")

</div>


