# How to sort an array?

**URL:** <https://forums.unrealengine.com/t/how-to-sort-an-array/464874>\
**Category:** Editor Scripting\
**Tags:** arrays, sorting, unreal-engine, Array, question\
**Created:** [May 8, 2020, 7:48pm UTC](https://forums.unrealengine.com/t/how-to-sort-an-array/464874 "2020-05-08T19:48:02Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![stuck\_compiling](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@stuck\_compiling](https://forums.unrealengine.com/u/stuck_compiling)\
**Post date:** [May 23, 2020, 10:11am UTC](https://forums.unrealengine.com/t/how-to-sort-an-array/464874/4 "2020-05-23T10:11:03Z")

</div>

Thank you! I thought I understood how this worked and tried to adapt it to my needs, but I don’t think I can use the loop array indexes as as is. You seem to be using the integer values as array slot indexes, could you explain this a little bit?

 ![302565-example.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/9/6/79626e2e9507d19f9fa9c5e386269bd2de3a78d8.png)

---

_[View the full topic](https://forums.unrealengine.com/t/how-to-sort-an-array/464874)._
