# Is there a way to sort map{} in verse?

**URL:** <https://forums.unrealengine.com/t/is-there-a-way-to-sort-map-in-verse/1389593>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, fortnite\
**Created:** [November 14, 2023, 11:45am UTC](https://forums.unrealengine.com/t/is-there-a-way-to-sort-map-in-verse/1389593 "2023-11-14T11:45:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Messiah4213](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/messiah4213/32/764721_2.png) [@Messiah4213](https://forums.unrealengine.com/u/Messiah4213)\
**Post date:** [November 14, 2023, 11:45am UTC](https://forums.unrealengine.com/t/is-there-a-way-to-sort-map-in-verse/1389593/1 "2023-11-14T11:45:15Z")

</div>

Hello!  
I have an map{} which contains [agent]int.  
And I want to make new map with highest int number to lower number.  
How can I do this?

---

<div class="post-metadata">

**Author:** ![SpyderNic](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/spydernic/32/933252_2.png) [@SpyderNic](https://forums.unrealengine.com/u/SpyderNic)\
**Post date:** [May 28, 2024, 4:55pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-sort-map-in-verse/1389593/3 "2024-05-28T16:55:42Z")

</div>

From the documentation here [Map | Unreal Editor For Fortnite Documentation | Epic Developer Community](https://dev.epicgames.com/documentation/en-us/uefn/map-in-verse)

> Elements in a map are ordered based on the order of key-value pairs when you create the map

You will need to iterate through your map and get the int values to sot them yourself I’m afraid.
