# Move multidimensional array data to root

**URL:** <https://forum.alumio.com/t/move-multidimensional-array-data-to-root/788>\
**Category:** Data Transformers\
**Tags:** data-transformer\
**Created:** [October 19, 2023, 8:54am UTC](https://forum.alumio.com/t/move-multidimensional-array-data-to-root/788 "2023-10-19T08:54:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TMourikSH](https://forum.alumio.com/letter_avatar_proxy/v4/letter/t/e56c9b/32.png) [@TMourikSH](https://forum.alumio.com/u/TMourikSH)\
**Post date:** [October 19, 2023, 8:54am UTC](https://forum.alumio.com/t/move-multidimensional-array-data-to-root/788/1 "2023-10-19T08:54:01Z")

</div>

We have an multidimensional array which we want to flatten to one array

```auto
'data': [
    0: [
        0: {.A.},
        1: {.B.}
    ],
    1: [
        0: {.C.},
        1: {.D.}
    ],
    2: [
        0: {.E.}
    ]
]

```

The result should be:

```auto
'result': [
    0: {.A.},
    1: {.B.},
    2: {.C.},
    3: {.D.},
    4: {.E.}
]

```

The amount of elements in arr1 can differ just as te amount of element in the sub arrays.

We tried a lot of different combinations of these transformers.  
-Node, transform nodes  
-Move using a pattern  
-Operator Transformer (Array Merge)  
-Move data between accessors

But nothing gives us the result we want, how can we get the result we want?

---

<div class="post-metadata">

**Author:** ![Gugi](https://forum.alumio.com/user_avatar/forum.alumio.com/gugi/32/236_2.png) [@Gugi](https://forum.alumio.com/u/Gugi)\
**Post date:** [October 24, 2023, 2:40pm UTC](https://forum.alumio.com/t/move-multidimensional-array-data-to-root/788/2 "2023-10-24T14:40:05Z")

</div>

Hi Tim,

If the number of levels is consistent inside the array, you can use the below JMESPath syntax to achieve the expected result.

```auto
&{data[][]}

```

You can use it in a Value Setter, such as below.

 ![image](https://alumio-forum.s3.dualstack.eu-central-1.amazonaws.com/uploads/original/2X/9/96b842f7bdb9119b3036ae932c6824339c86befa.png)

Please give it a try.
