# How to remove spaces between a "each item"

**URL:** <https://forum.bubble.io/t/how-to-remove-spaces-between-a-each-item/292285>\
**Category:** Plugin builders\
**Created:** [November 8, 2023, 7:06pm UTC](https://forum.bubble.io/t/how-to-remove-spaces-between-a-each-item/292285 "2023-11-08T19:06:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gutowlach](https://avatars.discourse-cdn.com/v4/letter/g/ac8455/32.png) [@gutowlach](https://forum.bubble.io/u/gutowlach)\
**Post date:** [November 8, 2023, 7:06pm UTC](https://forum.bubble.io/t/how-to-remove-spaces-between-a-each-item/292285/1 "2023-11-08T19:06:49Z")

</div>

I’m passing a list as a parameter to my API, like ‘[api.com/endpoint/list’](http://api.com/endpoint/list%E2%80%99). The problem is that Bubble passes it like this: ‘param1, param2, param3, param4’. The spaces between the parameters are breaking my API. How can I solve this? I’ve already tried the ‘find and replace’ and ‘split by’ options, but neither of them worked.

---

<div class="post-metadata">

**Author:** ![Nothing](https://avatars.discourse-cdn.com/v4/letter/n/58956e/32.png) [@Nothing](https://forum.bubble.io/u/Nothing)\
**Post date:** [November 9, 2023, 12:51pm UTC](https://forum.bubble.io/t/how-to-remove-spaces-between-a-each-item/292285/2 "2023-11-09T12:51:31Z")

</div>

How do you need this list to be written?

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dorilama/32/226878_2.png) [@dorilama](https://forum.bubble.io/u/dorilama)\
**Post date:** [November 9, 2023, 12:59pm UTC](https://forum.bubble.io/t/how-to-remove-spaces-between-a-each-item/292285/3 "2023-11-09T12:59:03Z")

</div>

How about showing some code and settings to understand what you are doing 🙃  
If you are not talking about lists handled with code in a plugin, but a list in an api request or similar maybe you want to try “formatted as text” on the list.

---

<div class="post-metadata">

**Author:** ![gutowlach](https://avatars.discourse-cdn.com/v4/letter/g/ac8455/32.png) [@gutowlach](https://forum.bubble.io/u/gutowlach)\
**Post date:** [November 9, 2023, 7:21pm UTC](https://forum.bubble.io/t/how-to-remove-spaces-between-a-each-item/292285/4 "2023-11-09T19:21:14Z")

</div>

Sure, I can explain a bit more. I’ve already solved the problem, but I don’t think it’s the best solution. My API call receives a parameter like `api.com/api/param`. The parameter consists of multiple addresses, separated by commas (`,`), like `address1,address2,address3`, and so on.

Each user can configure a list of addresses to search, and I save that in my database as a list. So, when I want to call the API, I use `api.com/api/Do a search for ....` and list each item.

The problem is that the list becomes like this: `address1, address2, address3....` After the comma, a space is added, which breaks the API.

The solution I found is to create two fields in the database: one to display as a list, and another that concatenates the previously saved address with the new one.

Here’s how it works: If it’s the first address saved, it will create a list with the address, and another field with the address too (like a text). If it’s not the first, it will add the new address to the list, and the other field will concatenate a comma (`,`) with the new address. So, in the database, there will be the normal list and a text field with a value like this: `address1,address2`. Is there an easier solution?

---

<div class="post-metadata">

**Author:** ![georgecollier](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/georgecollier/32/182327_2.png) [@georgecollier](https://forum.bubble.io/u/georgecollier)\
**Post date:** [November 9, 2023, 7:28pm UTC](https://forum.bubble.io/t/how-to-remove-spaces-between-a-each-item/292285/5 "2023-11-09T19:28:53Z")

</div>

> [@gutowlach](#):
>
> Is there an easier solution?

List:format as text where delimiter is , …

---

<div class="post-metadata">

**Author:** ![tylerboodman](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/tylerboodman/32/242142_2.png) [@tylerboodman](https://forum.bubble.io/u/tylerboodman)\
**Post date:** [November 9, 2023, 9:13pm UTC](https://forum.bubble.io/t/how-to-remove-spaces-between-a-each-item/292285/6 "2023-11-09T21:13:36Z")

</div>

Or after the list put`:joined with ","`

---

<div class="post-metadata">

**Author:** ![gutowlach](https://avatars.discourse-cdn.com/v4/letter/g/ac8455/32.png) [@gutowlach](https://forum.bubble.io/u/gutowlach)\
**Post date:** [November 10, 2023, 3:42pm UTC](https://forum.bubble.io/t/how-to-remove-spaces-between-a-each-item/292285/7 "2023-11-10T15:42:22Z")

</div>

Thanks, worked for me!
