# Sending an array as form-data

**URL:** <https://community.postman.com/t/sending-an-array-as-form-data/4606>\
**Category:** Help Hub\
**Tags:** faq\
**Created:** [March 18, 2019, 10:32pm UTC](https://community.postman.com/t/sending-an-array-as-form-data/4606 "2019-03-18T22:32:40Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![john-paul](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/john-paul/32/919_2.png) [@john-paul](https://community.postman.com/u/john-paul)\
**Post date:** [March 18, 2019, 10:32pm UTC](https://community.postman.com/t/sending-an-array-as-form-data/4606/1 "2019-03-18T22:32:40Z")

</div>

You can send an array in form-data by using the same name for multiple keys, and putting values in each one. Please see the screenshots below for examples (substitute `my_array` ​ for any name you want):

In **Bulk Edit** mode:  
​

 ![](https://us1.discourse-cdn.com/getpostman/original/3X/7/1/71704b5d8d7328c649c4be4b61c57d82c856d48d.png)​

In **Key-Value Edit** mode:  
​

 ![](https://us1.discourse-cdn.com/getpostman/original/3X/f/1/f10d4c6681c5b66c9c4061367e408ee1b78b5a2f.png)​

To test it out, you can try sending a POST request to [https://postman-echo.com/post](https://postman-echo.com/post), and check the response:  
​ ![](https://us1.discourse-cdn.com/getpostman/original/3X/0/8/08e2879bd455380932d7086f57748e3a18d7ce50.png)​

---

<div class="post-metadata">

**Author:** ![nwaweru](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/nwaweru/32/3085_2.png) [@nwaweru](https://community.postman.com/u/nwaweru)\
**Post date:** [October 24, 2019, 11:29am UTC](https://community.postman.com/t/sending-an-array-as-form-data/4606/2 "2019-10-24T11:29:00Z")

</div>

This is not working for me.

I am only getting the last value in my\_array.

Kindly assist.

---

<div class="post-metadata">

**Author:** ![kwoque](https://avatars.discourse-cdn.com/v4/letter/k/ee59a6/32.png) [@kwoque](https://community.postman.com/u/kwoque)\
**Post date:** [October 24, 2019, 11:04pm UTC](https://community.postman.com/t/sending-an-array-as-form-data/4606/3 "2019-10-24T23:04:56Z")

</div>

I think it depends on how your own API what you receive. in my case I use .NET to receive an object DTO from the body which contains a property **string[]**

What language do you use to receive the POST?

---

<div class="post-metadata">

**Author:** ![nwaweru](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/nwaweru/32/3085_2.png) [@nwaweru](https://community.postman.com/u/nwaweru)\
**Post date:** [October 25, 2019, 9:51am UTC](https://community.postman.com/t/sending-an-array-as-form-data/4606/4 "2019-10-25T09:51:00Z")

</div>

Thanks for the reply.

I am using Laravel Lumen for the API.

---

<div class="post-metadata">

**Author:** ![kwoque](https://avatars.discourse-cdn.com/v4/letter/k/ee59a6/32.png) [@kwoque](https://community.postman.com/u/kwoque)\
**Post date:** [October 25, 2019, 12:01pm UTC](https://community.postman.com/t/sending-an-array-as-form-data/4606/5 "2019-10-25T12:01:23Z")

</div>

I have found this post which said that this is a way to convert KeyValue pairs from JSON into an array. PHP is not my thing, maybe someone else can help you further.  
see: [https://stackoverflow.com/questions/7047870/issue-reading-http-request-body-from-a-json-post-in-php](https://stackoverflow.com/questions/7047870/issue-reading-http-request-body-from-a-json-post-in-php)  
Cheers

```auto
$input = json_decode($inputJSON, TRUE); //convert JSON into array

```

---

<div class="post-metadata">

**Author:** ![nwaweru](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/nwaweru/32/3085_2.png) [@nwaweru](https://community.postman.com/u/nwaweru)\
**Post date:** [October 25, 2019, 1:31pm UTC](https://community.postman.com/t/sending-an-array-as-form-data/4606/6 "2019-10-25T13:31:50Z")

</div>

Thanks for the assist. Let me investigate.

Cheers!

---

<div class="post-metadata">

**Author:** ![boonlenar](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/boonlenar/32/3625_2.png) [@boonlenar](https://community.postman.com/u/boonlenar)\
**Post date:** [January 19, 2020, 7:15am UTC](https://community.postman.com/t/sending-an-array-as-form-data/4606/7 "2020-01-19T07:15:54Z")

</div>

make sure you put in your key ex. my\_array …

---

<div class="post-metadata">

**Author:** ![mfakharabbas7](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/mfakharabbas7/32/4646_2.png) [@mfakharabbas7](https://community.postman.com/u/mfakharabbas7)\
**Post date:** [June 6, 2020, 3:20pm UTC](https://community.postman.com/t/sending-an-array-as-form-data/4606/8 "2020-06-06T15:20:13Z")

</div>

{  
“Product\_Reviews”:[  
{“Customer\_Name”:“Fakhar”,  
“Customer\_Description”:“Some Desciption”}  
]

}

// Use this Format

---

<div class="post-metadata">

**Author:** ![mbamaravictor](https://avatars.discourse-cdn.com/v4/letter/m/8491ac/32.png) [@mbamaravictor](https://community.postman.com/u/mbamaravictor)\
**Post date:** [June 15, 2020, 7:56pm UTC](https://community.postman.com/t/sending-an-array-as-form-data/4606/9 "2020-06-15T19:56:12Z")

</div>

use `key[]`: `value`

---

<div class="post-metadata">

**Author:** ![arlem](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/arlem/32/3078_2.png) [@arlem](https://community.postman.com/u/arlem)\
**Post date:** [March 22, 2021, 9:15am UTC](https://community.postman.com/t/sending-an-array-as-form-data/4606/10 "2021-03-22T09:15:06Z")

</div>

If you aren’t sure how this works, check the following collection:

[https://www.postman.com/postman/workspace/postman-answers/collection/9215231-2d7409b9-8b19-4a79-a6aa-fe616702d200?ctx=documentation](https://www.postman.com/postman/workspace/postman-answers/collection/9215231-2d7409b9-8b19-4a79-a6aa-fe616702d200?ctx=documentation)

You can also fork it to your Postman account to try it yourself. 🙂

---

<div class="post-metadata">

**Author:** ![luis.uria](https://avatars.discourse-cdn.com/v4/letter/l/db5fbb/32.png) [@luis.uria](https://community.postman.com/u/luis.uria)\
**Post date:** [May 5, 2021, 12:14pm UTC](https://community.postman.com/t/sending-an-array-as-form-data/4606/11 "2021-05-05T12:14:41Z")

</div>

Ty good sir. That was the point.

---

<div class="post-metadata">

**Author:** ![moorthiraj](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@moorthiraj](https://community.postman.com/u/moorthiraj)\
**Post date:** [June 13, 2021, 11:57am UTC](https://community.postman.com/t/sending-an-array-as-form-data/4606/12 "2021-06-13T11:57:04Z")

</div>

Actually I was trying to upload the media file in the array list. Initially I have done that before and then when I searched I found the solution from [here](https://stackoverflow.com/a/52366316/12267300)

---

<div class="post-metadata">

**Author:** ![jakub.kubik](https://avatars.discourse-cdn.com/v4/letter/j/ccd318/32.png) [@jakub.kubik](https://community.postman.com/u/jakub.kubik)\
**Post date:** [August 10, 2022, 8:07am UTC](https://community.postman.com/t/sending-an-array-as-form-data/4606/13 "2022-08-10T08:07:21Z")

</div>

Hi, is it possible to send an empty array? I tried, but it is not working for me…

---

<div class="post-metadata">

**Author:** ![pandeyaditya951](https://avatars.discourse-cdn.com/v4/letter/p/5e9695/32.png) [@pandeyaditya951](https://community.postman.com/u/pandeyaditya951)\
**Post date:** [April 4, 2023, 5:28am UTC](https://community.postman.com/t/sending-an-array-as-form-data/4606/14 "2023-04-04T05:28:54Z")

</div>

You can send an array in form-data like below

 ![Screenshot 2023-04-04 at 10.58.23 AM](https://us1.discourse-cdn.com/getpostman/original/3X/5/b/5bf6393ebd306af48b5b00b130e77fc432cd6e0f.png)
