# How to map array aggregator structure to xml format

**URL:** <https://community.make.com/t/how-to-map-array-aggregator-structure-to-xml-format/69162>\
**Category:** Questions\
**Tags:** arrays, aggregators\
**Created:** [February 11, 2025, 11:58pm UTC](https://community.make.com/t/how-to-map-array-aggregator-structure-to-xml-format/69162 "2025-02-11T23:58:49Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Miklos\_Bereznai](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@Miklos\_Bereznai](https://community.make.com/u/Miklos_Bereznai)\
**Post date:** [February 11, 2025, 11:58pm UTC](https://community.make.com/t/how-to-map-array-aggregator-structure-to-xml-format/69162/1 "2025-02-11T23:58:49Z")

</div>

Hello,

I am trying to format output of array aggregator to specific XML format. If I use type: collection, I get below format:

```auto
<tetelek>
  <tetel>
  ...
  </tetel>
</tetelek>
<tetelek>
  <tetel>
  ...
  </tetel>
</tetelek>

```

 ![Screenshot 2025-02-12 at 00.44.07](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/4/b/4b36a158eae6232f0865e07693380029cacf8747.jpeg)

However, I want following format, ie. tetelek is wrapper, and multiple tetel within that:

```auto
<tetelek>
  <tetel>
  ...
  </tetel>
  <tetel>
  ...
  </tetel>
</tetelek>

```

here’s my scenario:

 ![Screenshot 2025-02-12 at 00.43.14](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/7/e/7ee891450b26f4b017f45936ab3dd04698068aca.png)

blueprint:  
[blueprint.json](https://community.make.com/uploads/short-url/o1NzKkldQo1I6yF7CtCxIL84ydL.json) (71.5 KB)

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Donald\_Mitchell](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/donald_mitchell/32/8749_2.png) [@Donald\_Mitchell](https://community.make.com/u/Donald_Mitchell)\
**Post date:** [February 18, 2025, 11:08pm UTC](https://community.make.com/t/how-to-map-array-aggregator-structure-to-xml-format/69162/2 "2025-02-18T23:08:52Z")

</div>

Hello @Miklos_Bereznai,

Welcome to the Make Community!

I am not sure if this will help, but in your Array aggregator module you can try selecting Shopify Watch Orders as the Source Module instead of the Iterator module.

If that doesn’t work, the issue might be with your Data Structure in your XML module. Data Structures don’t copy over in blueprints so we wouldn’t be able to see if that’s the issue just based off the blueprint alone.

---

<div class="post-metadata">

**Author:** ![Miklos\_Bereznai](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@Miklos\_Bereznai](https://community.make.com/u/Miklos_Bereznai)\
**Post date:** [February 19, 2025, 9:20am UTC](https://community.make.com/t/how-to-map-array-aggregator-structure-to-xml-format/69162/3 "2025-02-19T09:20:15Z")

</div>

Thanks for looking into it!

The Iterator is needed as I pull line items from Shopify module, which can be multiple items based on order.

Probably something with the XML data structure, but feels like it doesn’t want to come through…

---

<div class="post-metadata">

**Author:** ![Miklos\_Bereznai](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@Miklos\_Bereznai](https://community.make.com/u/Miklos_Bereznai)\
**Post date:** [February 19, 2025, 9:26am UTC](https://community.make.com/t/how-to-map-array-aggregator-structure-to-xml-format/69162/4 "2025-02-19T09:26:20Z")

</div>

Here’s how the XML structure looks like. Last part _(tetelek)_ where I’d need each item within _tetel_ element (or elements if more items)

This is the strict XML format I’d need: [XML example | Szamlazz.hu API documentation](https://docs.szamlazz.hu/agent/generating_invoice/xml)

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/5/c/5cabaf55ad0d1c619473e3f634d0b7a29f8de4c4.jpeg)

---

<div class="post-metadata">

**Author:** ![momomomonmon](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/momomomonmon/32/59454_2.png) [@momomomonmon](https://community.make.com/u/momomomonmon)\
**Post date:** [February 19, 2025, 3:42pm UTC](https://community.make.com/t/how-to-map-array-aggregator-structure-to-xml-format/69162/5 "2025-02-19T15:42:47Z")

</div>

@Miklos_Bereznai  
Hi, I haven’t solved it yet, but I have confirmed that if I have the following array structure, I can input it to the Cretate XML module and it will output the XML I want. I would like to know what the structure of the Array Aggregator output is.

```auto
[
    {
        "array": [
            {
                "tetelek": {
                    "tetel": [
                        {
                            "megnevezes": [
                                "Elado izé"
                            ],
                            "mennyiseg": [
                                1
                            ],
                            "mennyisegiEgyseg": [
                                "db"
                            ],
                            "nettoEgysegar": [
                                10000
                            ],
                            "afakulcs": [
                                27
                            ],
                            "nettoErtek": [
                                10000
                            ],
                            "afaErtek": [
                                2700
                            ],
                            "bruttoErtek": [
                                12700
                            ],
                            "megjegyzes": [
                                "lorem ipsum"
                            ]
                        },
                        {
                            "megnevezes": [
                                "Elado izé 2"
                            ],
                            "mennyiseg": [
                                2
                            ],
                            "mennyisegiEgyseg": [
                                "db"
                            ],
                            "nettoEgysegar": [
                                10000
                            ],
                            "afakulcs": [
                                27
                            ],
                            "nettoErtek": [
                                20000
                            ],
                            "afaErtek": [
                                5400
                            ],
                            "bruttoErtek": [
                                25400
                            ],
                            "megjegyzes": [
                                "lorem ipsum 2"
                            ]
                        }
                    ]
                }
            }
        ],
        " __IMTAGGLENGTH__": 1
    }
]

```

---

<div class="post-metadata">

**Author:** ![Miklos\_Bereznai](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@Miklos\_Bereznai](https://community.make.com/u/Miklos_Bereznai)\
**Post date:** [February 19, 2025, 9:25pm UTC](https://community.make.com/t/how-to-map-array-aggregator-structure-to-xml-format/69162/6 "2025-02-19T21:25:33Z")

</div>

@momomomonmon thanks for taking a look!  
This is output of array aggregator:

````auto
[
    {
        "array": [
            {
                "tetel": [
                    {
                        "megnevezes": "FELS BBQ SZÓSZ - KLASSZIKUS",
                        "mennyiseg": 1,
                        "mennyisegiEgyseg": "db",
                        "nettoEgysegar": 2513.39,
                        "afakulcs": "27",
                        "nettoErtek": 2513.39,
                        "afaErtek": 678.61,
                        "bruttoErtek": 3192,
                        "megjegyzes": null
                    }
                ]
            },
            {
                "tetel": [
                    {
                        "megnevezes": "FELS BBQ SZÓSZ - KOREAI",
                        "mennyiseg": 3,
                        "mennyisegiEgyseg": "db",
                        "nettoEgysegar": 1156.16,
                        "afakulcs": "176",
                        "nettoErtek": 3468.48,
                        "afaErtek": 2035.84,
                        "bruttoErtek": 3192,
                        "megjegyzes": null
                    }
                ]
            }
        ],
        " __IMTAGGLENGTH__": 2
    }
]```
````

---

<div class="post-metadata">

**Author:** ![momomomonmon](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/momomomonmon/32/59454_2.png) [@momomomonmon](https://community.make.com/u/momomomonmon)\
**Post date:** [February 20, 2025, 4:51am UTC](https://community.make.com/t/how-to-map-array-aggregator-structure-to-xml-format/69162/7 "2025-02-20T04:51:24Z")

</div>

@Miklos_Bereznai  
Thank you very much!  
I also took a look at the Blueprint you posted, I haven’t tried it because I don’t use Shopify, but my guess is that the following settings will solve the problem.

1. Delete Iterator module, add Repeater module. 2.
2. Input the length of the data in Shopify for Repeats in Repeater module (`length({{17.data.line_items}})`)
3. For Array Aggregator, use `i` of Repeater to get the value.

For your reference, I have attached an image of scenario that I created in my environment.

 ![Scenario Overiew](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/2/3/230098c297b5115baa57d76f58eb9302fcf1d53b.png)  
I am using the Parse XML module just to try it out, so it is equivalent to the Shopify module in your environment. There is no need to use the Parse XML module in your environment.

 ![Config Array Aggregator](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/a/2/a2d9560af70b92cdd7aa84594aa4339d058d9956.png)

---

<div class="post-metadata">

**Author:** ![Miklos\_Bereznai](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@Miklos\_Bereznai](https://community.make.com/u/Miklos_Bereznai)\
**Post date:** [February 20, 2025, 10:27pm UTC](https://community.make.com/t/how-to-map-array-aggregator-structure-to-xml-format/69162/8 "2025-02-20T22:27:11Z")

</div>

Thanks a lot @momomomonmon

IT WORKS!!!

---

<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:** [March 7, 2025, 2:46pm UTC](https://community.make.com/t/how-to-map-array-aggregator-structure-to-xml-format/69162/9 "2025-03-07T14:46:49Z")

</div>


