--- title: "key for value in map()" slug: "basic-value-to-key-from-map" updated: 2026-08-12T06:49:38Z published: 2026-08-12T06:49:38Z canonical: "docs.lobstersoftware.com/basic-value-to-key-from-map" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # key for value in map() This function returns the key to a value **a** in map **b**. If no key is found, an empty string with a set empty flag is returned. The first key found is returned (there may be more than one). ## Parameters | Parameter | Description | | --- | --- | | a | Value | | b | (optional) Name of the map. Default: *default* | | c | (optional) *true* if value **a** only has to be contained in the map value and does not have to be identical. Default: *false* | ## Examples Assume a map *myMap* with the values {*key1=value*, *key2=othervalue*}. | Parameter a | Parameter b | Parameter c | Result | | --- | --- | --- | --- | | value | myMap | | key1 | | other | myMap | true | key2 |