--- title: "remove from map()" slug: "basic-remove-from-map" updated: 2026-08-12T08:10:15Z published: 2026-08-12T08:10:15Z canonical: "docs.lobstersoftware.com/basic-remove-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. # remove from map() This function removes the key-value pair with key **a** from a map **b**. The return value of the function is the value of the removed key. If the map has an [Inheritance value](/v1/docs/en/intro-concepts-inheritance-value), only the visible value will be returned. **NOTE:** Hidden values can be removed as well. See the explanations for the [Empty flag](/v1/docs/en/intro-concepts-empty-flag). ## Parameters | Parameter | Description | | --- | --- | | a | Key of the key-value pair to be removed. | | b | (optional) Name of the map. Default: "default"*.* | ## Examples Assume a map "myMap" with the elements {key1=val1, key2=val2, key3=val3}. | Parameter a | Parameter b | Result | Elements in map | | --- | --- | --- | --- | | key2 | myMap | val2 | {key1=val1, key3=val3} | | key2 | myMap | | {key1=val1, key3=val3} | | key1 | myMap | val1 | {key3=val3} |