# Perspective: How can I reorder array elements \*\*and maintain bindings\*\*?

**URL:** <https://forum.inductiveautomation.com/t/perspective-how-can-i-reorder-array-elements-and-maintain-bindings/40011>\
**Category:** Ignition\
**Tags:** ignition80, perspective\
**Created:** [October 26, 2020, 11:27am UTC](https://forum.inductiveautomation.com/t/perspective-how-can-i-reorder-array-elements-and-maintain-bindings/40011 "2020-10-26T11:27:06Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [October 26, 2020, 3:46pm UTC](https://forum.inductiveautomation.com/t/perspective-how-can-i-reorder-array-elements-and-maintain-bindings/40011/12 "2020-10-26T15:46:07Z")

</div>

You can re-order by dragging array elements. As @jlandwerlen suggested, you need to click-hold to the _right_ of the element you’d like to re-arrange. This will NOT bring the binding along. You can’t supply a binding base don arbitrary relative positions to change if the position changes.

When you set up a binding within an array, it’s defined in the schema as `custom.my_array[x].some_key`. dragging the element to a different position results in the binding pointing to the original position because the `x` in the _binding_ has not changed. If you need to re-arrange array elements and update bindings, it sounds like you should actually be using an object because that array position apparently means something more specific than an index would suggest.

```auto
bays: {
    "one": {},
    "two": {},
    "three": {}
}

```

is more correct than

```auto
bays: [
    0: {},
    1: {},
    2: {}
]

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/perspective-how-can-i-reorder-array-elements-and-maintain-bindings/40011)._
