# Are maps with keys of type any usable?

**URL:** <https://forums.unrealengine.com/t/are-maps-with-keys-of-type-any-usable/1157389>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [May 7, 2023, 8:16am UTC](https://forums.unrealengine.com/t/are-maps-with-keys-of-type-any-usable/1157389 "2023-05-07T08:16:41Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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:** [May 7, 2023, 12:45pm UTC](https://forums.unrealengine.com/t/are-maps-with-keys-of-type-any-usable/1157389/3 "2023-05-07T12:45:29Z")

</div>

Maps require that their keys are comparable for equality at runtime, and `any` includes values that aren’t. The `comparable` type captures exactly this constraint, so you should be able to use it as the key of a map: e.g. `Map : [comparable]int`.

From your example, it looks like you’re trying to use `any` for values in a map, not the keys. That is allowed, but because `any` isn’t even comparable, there’s very little you can do with those values. Using `comparable` for the value would be slightly more useful, but we don’t yet support dynamic downcasting from it.

See also: [Is `false` a bottom type in Verse? - #4 by AndrewScheidecker](https://forums.unrealengine.com/t/is-false-a-bottom-type-in-verse/1156905/4)

---

_[View the full topic](https://forums.unrealengine.com/t/are-maps-with-keys-of-type-any-usable/1157389)._
