Stay organized with collections
Save and categorize content based on your preferences.
Takes a map, creates a copy of the map, and removes the item for the specified key.
If the key doesn't exist in the map, the function returns a copy of the
original map.
For example, if you have map1 = {key1: value1, key2: value2} and key =
key3, map.delete(map, key) returns {key1: value1, key2: value2}.
Arguments
Arguments
map
The map to delete from.
key
A string that represents the specified key to remove from the map.
Returns
A copy of the map with the item specified by the key removed.
Raised exceptions
Exceptions
TypeError
If map is not a map (dictionary) or the key is not a string.
Examples
# Remove item for specified key from copy of map# Returns `{"key1": "hello"}`-init:assign:-my_map:{"key1":"hello","key2":"world"}-returnStep:return:${map.delete(my_map, "key2")}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-30 UTC."],[],[]]