# How to Extract and Concatenate Values from a Nested Array of Collections

**URL:** <https://community.make.com/t/how-to-extract-and-concatenate-values-from-a-nested-array-of-collections/53896>\
**Category:** Questions\
**Tags:** arrays\
**Created:** [September 3, 2024, 2:18pm UTC](https://community.make.com/t/how-to-extract-and-concatenate-values-from-a-nested-array-of-collections/53896 "2024-09-03T14:18:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Clauber\_Janauys](https://avatars.discourse-cdn.com/v4/letter/c/6a8cbe/32.png) [@Clauber\_Janauys](https://community.make.com/u/Clauber_Janauys)\
**Post date:** [September 3, 2024, 2:18pm UTC](https://community.make.com/t/how-to-extract-and-concatenate-values-from-a-nested-array-of-collections/53896/1 "2024-09-03T14:18:48Z")

</div>

![Captura de Tela 2024-09-03 às 14.45.27](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/6/f/6fc51fffaaa7ba56146367c4f94bbf4b483fe734.png)  
I have a GET module that returns an array containing an indefinite number of collections. Inside each of these collections, there is a plain\_text value that I need to extract. My goal is to create a variable that contains all these plain\_text values concatenated into a single line. I’ve tried using the formula join(map(array; item within the collection); -), but it’s not working. How can I correctly extract all these plain\_text values and combine them into one string variable?

---

<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:** [September 3, 2024, 2:24pm UTC](https://community.make.com/t/how-to-extract-and-concatenate-values-from-a-nested-array-of-collections/53896/2 "2024-09-03T14:24:28Z")

</div>

Welcome to the Make community!

You can use the built-in function `map` before `join`

e.g.:

```plaintext
{{ join(map(1.contexto; "plain_text"); "-") }}

```

If you need further assistance, please provide the following:

Please provide the **output** bundles of the modules by running the scenario (or get from the [scenario History tab](https://www.make.com/en/help/scenarios/scenario-execution-history)), then click the white speech bubble on the top-right of each module and select “Download input/output bundles”.

 ![](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/2/8/2876156ab3ea5bc9e40bbc0edfb9f025406b7c48.png)

### A. Upload as Text File

Save each bundle contents in your text editor as a `bundle.txt` file, and upload it here into this discussion thread.

### B. Insert as Formatted Code Block

If you are unable to upload files on this forum, alternatively you can paste the formatted bundles.  
These are the two ways to format text so that it won’t be modified by the forum:

- **Method 1: Type code block manually**

- **Method 2. Highlight and click the format button in the editor**

Providing the input/output bundles will allow others to _replicate_ what is going on in the scenario even if they do not use the external service.

This will allow others to better assist you. Thanks!

— @samliew

* * *

P.S.: Did you know, [the concepts](https://community.make.com/t/make-academy-course-overview/29699) of about 70% of questions asked on this forum are already covered in the [Make Academy](https://academy.make.com). Investing some effort into it will save you lots of time and frustration using Make later!

---

<div class="post-metadata">

**Author:** ![Clauber\_Janauys](https://avatars.discourse-cdn.com/v4/letter/c/6a8cbe/32.png) [@Clauber\_Janauys](https://community.make.com/u/Clauber_Janauys)\
**Post date:** [September 4, 2024, 5:21am UTC](https://community.make.com/t/how-to-extract-and-concatenate-values-from-a-nested-array-of-collections/53896/3 "2024-09-04T05:21:54Z")

</div>

Hello! Thank you very much for the help! So, I tried using this method as shown in the screenshots, but I still can’t get the desired result. The number of collections in the ‘Contexto’ array is indeterminate. I would just like to create a variable with all the plain\_text values.

 ![Captura de Tela 2024-09-04 às 06.15.59](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/a/2/a2fd70073cba4b96b1d8a16ccea3ba4d9ec33cac.png)

 ![Captura de Tela 2024-09-04 às 06.21.18](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/b/4/b47dc91e0c26a9d06ff7ede1c03315c89d74bd8b.png)

```auto
            "Contexto": [
                {
                    "type": "text",
                    "text": {
                        "content": "Metas da semana:",
                        "link": null
                    },
                    "annotations": {
                        "bold": true,
                        "italic": false,
                        "strikethrough": false,
                        "underline": false,
                        "code": false,
                        "color": "default"
                    },
                    "plain_text": "Metas da semana:",
                    "href": null
                },
                {
                    "type": "text",
                    "text": {
                        "content": "\n• Seguir planejamento, journaling e manter o foco.\n• Criação da versão 1 da IA Pessoal\n• Análise/estudos sobre a estratégia de captação de clientes",
                        "link": null
                    },
                    "annotations": {
                        "bold": false,
                        "italic": false,
                        "strikethrough": false,
                        "underline": false,
                        "code": false,
                        "color": "default"
                    },
                    "plain_text": "\n• Seguir planejamento, journaling e manter o foco.\n• Criação da versão 1 da IA Pessoal\n• Análise/estudos sobre a estratégia de captação de clientes",
                    "href": null
                },
                {
                    "type": "text",
                    "text": {
                        "content": "\nObjetivos:",
                        "link": null
                    },
                    "annotations": {
                        "bold": true,
                        "italic": false,
                        "strikethrough": false,
                        "underline": false,
                        "code": false,
                        "color": "default"
                    },
                    "plain_text": "\nObjetivos:",
                    "href": null
                },
                {
                    "type": "text",
                    "text": {
                        "content": "\nSinta-se a vontade para escrever sobre o que quiser, que seja importante para a avaliação de desempenho e progressão. Foque em dados pertinentes para avaliar o segmentos das leis do coelho, a conclusão das metas e as expectativas/realidade de cada tarefa realizada. Isso será de extrema importância para que seja avaliado o grau de desempenho e evolução para que o tempo gasto em cada projetos não seja o fator mais importante.",
                        "link": null
                    },
                    "annotations": {
                        "bold": false,
                        "italic": false,
                        "strikethrough": false,
                        "underline": false,
                        "code": false,
                        "color": "default"
                    },
                    "plain_text": "\nSinta-se a vontade para escrever sobre o que quiser, que seja importante para a avaliação de desempenho e progressão. Foque em dados pertinentes para avaliar o segmentos das leis do coelho, a conclusão das metas e as expectativas/realidade de cada tarefa realizada. Isso será de extrema importância para que seja avaliado o grau de desempenho e evolução para que o tempo gasto em cada projetos não seja o fator mais importante.",
                    "href": null
                }
            ],

```

---

<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:** [September 5, 2024, 1:23am UTC](https://community.make.com/t/how-to-extract-and-concatenate-values-from-a-nested-array-of-collections/53896/4 "2024-09-05T01:23:37Z")

</div>

You actually have to manually TYPE in character-by-character `plain_text`, and NOT select the variable from the panel.

![Screenshot_2024-09-05_090943](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/1/d/1d9d45968ec3e11c9c50facaeb4c334b39c1abd4.png)

Hope this helps! Let me know if there are any further questions or issues.

— @samliew

* * *

P.S.: Did you know, [the concepts](https://community.make.com/t/make-academy-course-overview/29699) of about 70% of questions asked on this forum are already covered in the [Make Academy](https://academy.make.com). Investing some effort into it will save you lots of time and frustration using Make later!

---

<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:** [December 4, 2024, 2:27am UTC](https://community.make.com/t/how-to-extract-and-concatenate-values-from-a-nested-array-of-collections/53896/5 "2024-12-04T02:27:07Z")

</div>

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


