# How use the verse maps with container types

**URL:** <https://forums.unrealengine.com/t/how-use-the-verse-maps-with-container-types/1176627>\
**Category:** Programming & Scripting\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [May 24, 2023, 4:01am UTC](https://forums.unrealengine.com/t/how-use-the-verse-maps-with-container-types/1176627 "2023-05-24T04:01:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![caioreix](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/caioreix/32/703192_2.png) [@caioreix](https://forums.unrealengine.com/u/caioreix)\
**Post date:** [May 24, 2023, 4:01am UTC](https://forums.unrealengine.com/t/how-use-the-verse-maps-with-container-types/1176627/1 "2023-05-24T04:01:00Z")

</div>

I read in verse language reference that maps can use as key some different types like:

- A [class](https://dev.epicgames.com/documentation/en-us/uefn/class-in-verse), if it’s comparable
- An [option](https://dev.epicgames.com/documentation/en-us/uefn/verse-glossary#option), if the element type is comparable
- An [array](https://dev.epicgames.com/documentation/en-us/uefn/array-in-verse), if the element type is comparable
- A map if both the key and the value types are comparable
- A [tuple](https://dev.epicgames.com/documentation/en-us/uefn/verse-glossary#tuple) if all elements in the tuple are comparable

But I’m not achieving success with my attempts. If someone could provide me with an example of each type, I would appreciate it!

---

<div class="post-metadata">

**Author:** ![Mapshot\_Agency](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mapshot_agency/32/700660_2.png) [@Mapshot\_Agency](https://forums.unrealengine.com/u/Mapshot_Agency)\
**Post date:** [May 24, 2023, 8:20am UTC](https://forums.unrealengine.com/t/how-use-the-verse-maps-with-container-types/1176627/2 "2023-05-24T08:20:06Z")

</div>

Did you add the comparable type to the values you want to use in your map?  
Can you add your code example?

---

<div class="post-metadata">

**Author:** ![TheCreaitor](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/thecreaitor/32/1100960_2.png) [@TheCreaitor](https://forums.unrealengine.com/u/TheCreaitor)\
**Post date:** [May 24, 2023, 1:44pm UTC](https://forums.unrealengine.com/t/how-use-the-verse-maps-with-container-types/1176627/3 "2023-05-24T13:44:15Z")

</div>

My results:

```auto
maps := class():

    ClassMap : [unique_class]string = map{}

    OptionMap : [?int]string = map{}

    ArrayMap : [[]unique_class]string = map{} # SAYS IT IS NOT IMPLEMENTED YET

    MapMap : [[unique_class]unique_class]string = map{} # SAYS IT IS NOT IMPLEMENTED YET

    TupleMap : [tuple(unique_class, unique_class)]string = map{} # SAYS IT IS NOT IMPLEMENTED YET

unique_class := class<unique>():

```

---

<div class="post-metadata">

**Author:** ![AndrewScheidecker](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/andrewscheidecker/32/926976_2.png) [@AndrewScheidecker](https://forums.unrealengine.com/u/AndrewScheidecker)\
**Post date:** [June 2, 2023, 3:35pm UTC](https://forums.unrealengine.com/t/how-use-the-verse-maps-with-container-types/1176627/4 "2023-06-02T15:35:58Z")

</div>

Just wanted to confirm that this is correct. Arrays, maps, and tuples are comparable, but we do not yet implement using them as map keys.
