Data format, mapping, processing an array

Hi Makers, I’m uncertain how to handle this data format, could you advise?

I’m hoping to loop through each record of “Travel Mates” provided by a form.

Here’s the scenario:

And input I’m receiving:

I’m uncertain how to process the array in the iterator to get to the desired record.

As currently it doesn’t provide the individual records, but only the total number of bunders and position of the respective bundle.

Thanks for your advise!

PS: I’m uncertain what to call this actually and happy to adapt the title according to your suggestions. :slight_smile:

You should not select a value within the array to iterate – you should select the ARRAY itself for the Iterator’s “Array” field.

From your last screenshot, it looks like the Travel Mates variable is not an array for some reason, hence the output is not what we would expect.


Thanks @samliew, is it possible to use inline functions or a variable module to transform format the variable comes in to the array format required for the iterator to work?

In other cases, it was indeed just as easy as to enter the array into the iterator for it to work out of the box. The data format in this case appears to prevent this.

Welcome to the Make community!

1. Scenario blueprint

Please export the scenario blueprint file to allow others to view the mappings and settings. At the bottom of the scenario editor, you can click on the three dots to find the Export Blueprint menu item.

(Note: Exporting your scenario will not include private information or keys to your connections)

Uploading it here will look like this:

blueprint.json (12.3 KB)

2. And most importantly, Output bundles

Please provide the output bundles of the trigger module (Module with the [2] in the square box) by running the scenario, then click the white speech bubble on the top-right of each module and select “Download output bundles”.


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

Uploading it here will look like this:

bundle.txt (12.3 KB)


If you are unable to upload files on this forum, alternatively you can paste the formatted output bundle in this manner:

  • Either add three backticks ``` before and after the code, like this:

    input/output bundle content goes here

  • Or use the format code button in the editor:

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

Following these steps will allow others to assist you here. Thanks!


Thanks @samliew, I’m unable to upload the text file, but have copied the output below and attached the blueprint.

blueprint.json (886.7 KB)

        "submissionId": "XXX",
        "formId": "XXX",
        "fornName": "XXX,
        "submissionTime": "XXX",
        "answers": {
            "8NmRXNCGE8H2ik8UjdKC3G": "",
            "aV56KpDUHZLhhRTvinL7sN": "XXX",
            "h2Ws4Cexsj1wHPSKSNZ5Ui": [
                    "Company": "XXX",
                    "Invoice": "XXX",
                    "OpsName": "XXX",
                    "URL": "XXX",
                    "PartnerID": "XXX",
                    "P-Self-Guided#": 3,
                    "P-BuyIn#": 0,
                    "LogoURL": "XXX",
                    "recordID": "XXX"
            "im2eb9HyvQrEbVEvxPwwHB": [
                    "cNotes": "XXX",
                    "Phone": "XXX",
                    "Country": "XXX",
                    "Travel mates": [
                    "NameFirst": "XXX",
                    "NameLast": "XXX",
                    "DBL": 1,
                    "Gender": "XXX",
                    "SourceAdded": "XXX",
                    "Form": "XXX",
                    "Guest": "XXX",
                    "Pax": 2,
                    "GuestID": "XXX",
                    "Link:Fillout:Update": "XXX",
                    "Link:Jotform:Meeting": "XXX",
                    "Link:Jotform:Feedback": XXX",
                    "Tour-Room": "-",
                    "PaxChecker": XXX,
                    "Created": "XXX",
                    "TypeRoom": "XXX",
                    "Trigger": "Add",
                    "LastmodifiedPhone/Email": XXX",
                    "Last Modified": "XXX,
                    "Check": "Tour",
                    "Tour String": {
                        "error": "#ERROR!"
            "kje3omT37u3SCkCKSHHAvh": [],
            "qm7iJvL2nFt2MGswGZdhTo": "XXX",
            "rHeBbcxkxYzteNgpGmsV5s": "XXXX",
            "v5mrjKYbEJVfmJtjL7yKYp": [
                    "Title": "XXX",
                    "Days": 8,
                    "Product": "XXX",
                    "recordID": "XXX"
        "urlParams": {
            "c": "XXX"
        "calculations": {}

There are three arrays, so this is one way to do it, much like the movie Inception:

1. First array, convert answers collection to array


2. Second array, iterate values


3. Add filter to only return “`Travel mates`”

4. Iterate Travel mates array





Hehe, that’s indeed an Inception or at least a matrushka doll.

Thanks for the instructions! I followed those, but am unable to select a variable from the second iterator (module 20/33) in the following step. It only provides a generic “Value”.

Here’s the output bundle of the second iterator:

        "Travel mates": [
        "Type": "Lead",
        "NameFirst": "TESTF1",
        "NameLast": "TESTL1",
        "DBL": 1,
        "SourceAdded": "Fillout:B2B",
        "Form": "",
        "Guest": "TESTF1 TESTL1",
        "Pax": 2,
        "GuestID": "rec0YIjw54f2jJIUg",
        "Link:Fillout:Update": "",
        "Link:Jotform:Meeting": "",
        "Link:Jotform:Feedback": "[first]=TESTF1&name[last]=TESTL1&email=&group=&guestid=rec0YIjw54f2jJIUg&guide1=&guide2a=&guide2b=&style=",
        "GuestRowHTML": "<li><a href=>TESTF1 TESTL1</a></li>",
        "Tour-Room": "-",
        "PaxChecker": 2,
        "Jotform": "",
        "RETIRED Link:Jotform:Join": "",
        "Created": "2024-01-25T10:35:36.000Z",
        "TypeRoom": "DBL",
        "Last Modified": "2024-01-25T10:35:36.000Z",
        "Check": "Tour",
        "🤖 Weekly": "Departure",
        "GuestRooming": "TESTF1 TESTL1",
        "LastModifiedEmailDeparture": "2024-01-25T10:35:36.000Z",
        "Tour String": {
            "error": "#ERROR!"
        "RETIRED Link:Jotform:YourDetails v2": "",
        "WhatsApp": null,
        "RETIRED Link:Fillout:Create": "",
        "RETIRED Link:Jotform:YourDetails": "",
        "PassportResize": "",
        "Calculation": 0,
        "Calculation 2": 0,
        "Gender?": "",
        "Calculation 3": "Yes",
        "recordID": "rec0YIjw54f2jJIUg",
        "__IMTINDEX__": 1,
        "__IMTLENGTH__": 1

It appears that the output/array in your setup is differently structured to be recognized.

I have to test whether the bundle position is static, but could an alternative approach work where I filter the output of the the first iterator (with the “to array”-function) for a static bundle position and try to map the given key Travel mate? On a first attempt of mine, that failed with error:

Failed to map 'array': Function 'map' finished with error! '' is not a valid array.

Hi @Zbulo

You can run the iterator module once to see the values in next module to map.

If you require additional assistance, please don’t hesitate to reach out to us.
MSquare Support
Visit us here
Youtube Channel


Type in exactly this (case-sensitive), or copy-paste in the last Iterator:

{{20.`Travel mates`}}


@samliew thanks again, I updated thie , but for some reason the bundles get mixed up.

Bundle 7 includes {{20.Travel mates}}:

But Bundle 6 instead of 7 passes the filter:

And ending in an empty input for module 21.

Any idea why the bundles get mixed up in the filter?

Looks like the output of the second iterator is an array with only one item.

So you need to get the first item of the array before we can access Travel mates.

{{ 20.array.1.`Travel mates` }}


Thanks for your enduring support. The marked solution including the following posts helped to crack this nut. I didn’t know how to unpack nested arrays and that one can use variables that aren’t shown in the scenario builder, learned something know. :slight_smile:


No problem, it’s my pleasure to be able to help!