# Iterate inside Array

**URL:** <https://community.make.com/t/iterate-inside-array/31887>\
**Category:** Questions\
**Tags:** collections, arrays\
**Created:** [March 27, 2024, 3:48pm UTC](https://community.make.com/t/iterate-inside-array/31887 "2024-03-27T15:48:30Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vanni\_Cone](https://avatars.discourse-cdn.com/v4/letter/v/73ab20/32.png) [@Vanni\_Cone](https://community.make.com/u/Vanni_Cone)\
**Post date:** [March 27, 2024, 3:48pm UTC](https://community.make.com/t/iterate-inside-array/31887/1 "2024-03-27T15:48:30Z")

</div>

I need to show all the results of an array aggregator inside a google sheet cell. (must be both micio and miao)  
This is the structure:

![1](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/8/7/874a8be3b7c6bd592afa229eeee7bfbe035efaba.png)

This is inside the Array Aggregator:

 ![6](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/6/d/6d370d55ec7276b67fd2a3764d7e816859bc4dad.png)

This is inside the Google Sheet Update a cell module:

 ![3](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/b/b/bb7813a9b8828bce7c9d3fe4ae0489e4a7a02b60.png)

At the end the result will be this:(I have tried also to go deeper using flatten())  
 ![result](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/5/7/579d15e49d5bdaef2ca8c59aa63dab6f2b85b7f0.png)

---

<div class="post-metadata">

**Author:** ![NolaDigital](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/noladigital/32/226_2.png) [@NolaDigital](https://community.make.com/u/NolaDigital)\
**Post date:** [March 27, 2024, 4:01pm UTC](https://community.make.com/t/iterate-inside-array/31887/2 "2024-03-27T16:01:35Z")

</div>

Made a quick sample array for this (to mimic yours):  
 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/3/5/35ec238b7fd41ef52e3bbaa6099ee5f0cb923562.png)

You can push this in a comma-separated text with these functions:  
 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/f/d/fd91eaf76337e6b716d622a8b2f5500df4e0cf86.png)  
By using the `join()` function we’re pushing the info out of the array into a string. And with the `map()` we just get the email object. Without `map()`, you’d get `{object},{object}` in your sheet 🙂

This then looks like this is Sheets:

![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/0/6/06b425ea8be00a76b14267c4b9ad2f9cf6c16661.png)

---

<div class="post-metadata">

**Author:** ![Vanni\_Cone](https://avatars.discourse-cdn.com/v4/letter/v/73ab20/32.png) [@Vanni\_Cone](https://community.make.com/u/Vanni_Cone)\
**Post date:** [March 27, 2024, 4:17pm UTC](https://community.make.com/t/iterate-inside-array/31887/3 "2024-03-27T16:17:36Z")

</div>

It’s almost done but it returns me something like ( , )

 ![1](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/b/c/bcd571449ce57bee5b629ad6ed13c54c40bddfc6.png)

What should i put here?

 ![2](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/9/a/9a2840a79c8184c07aa7c2ca4f22fe003a2dfab4.png)

Perdon my English

---

<div class="post-metadata">

**Author:** ![NolaDigital](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/noladigital/32/226_2.png) [@NolaDigital](https://community.make.com/u/NolaDigital)\
**Post date:** [March 27, 2024, 8:45pm UTC](https://community.make.com/t/iterate-inside-array/31887/4 "2024-03-27T20:45:55Z")

</div>

Where you have `email (A)` now, you need to put the “raw” name of the field. You can see this is you hover over the key. Since it’s coming from Sheets, column A is mostly 0 as a raw fieldname.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/7/8/78695cd97be0f90aa5b0b51286f25eeaa04d1ae7.png)

---

<div class="post-metadata">

**Author:** ![AlmaWalters](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@AlmaWalters](https://community.make.com/u/AlmaWalters)\
**Post date:** [March 27, 2024, 9:54pm UTC](https://community.make.com/t/iterate-inside-array/31887/5 "2024-03-27T21:54:10Z")

</div>

If you want to show all the results from your array aggregator in one cell in Google Sheets, you can use the join() function to put them together in a string. For example, if you have micio and miao in your array, you can write something like this in your Google Sheets module:  
bash  
{{join(yourArrayAggregatorOutputPath; ", ")}}  
This will make the cell show micio, miao with a comma and space between the words. You can change the comma and space to whatever you like to separate the values.  
If using flatten() didn’t work for you, double-check that your array aggregator is set up right to get all the values you need. Also, make sure the path in the join() function is correct and points to the array aggregator’s output.

P.S. Sorry, for the way the code looks. I just didn’t find how to copy it here.

---

<div class="post-metadata">

**Author:** ![samliew](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/samliew/32/13327_2.png) [@samliew](https://community.make.com/u/samliew)\
**Post date:** [March 27, 2024, 10:43pm UTC](https://community.make.com/t/iterate-inside-array/31887/6 "2024-03-27T22:43:28Z")

</div>

Alma, the array aggregator aggregates to an array of collections, so you cannot simply join them. A map would still be required first.

@Vanni_Cone A better solution would be simply to use a TEXT AGGREGATOR.

Just specify the separator as comma+space.

---

<div class="post-metadata">

**Author:** ![Vanni\_Cone](https://avatars.discourse-cdn.com/v4/letter/v/73ab20/32.png) [@Vanni\_Cone](https://community.make.com/u/Vanni_Cone)\
**Post date:** [March 28, 2024, 8:41am UTC](https://community.make.com/t/iterate-inside-array/31887/7 "2024-03-28T08:41:42Z")

</div>

Thanks man appreciate your work. \<3

---

<div class="post-metadata">

**Author:** ![AlmaWalters](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@AlmaWalters](https://community.make.com/u/AlmaWalters)\
**Post date:** [March 29, 2024, 6:19am UTC](https://community.make.com/t/iterate-inside-array/31887/8 "2024-03-29T06:19:00Z")

</div>

Thanks for pointing that out.

---

<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:** [April 11, 2024, 7:45am UTC](https://community.make.com/t/iterate-inside-array/31887/9 "2024-04-11T07:45:17Z")

</div>

This topic was automatically closed because it's resolved or inactive. Please, start a new topic.


