Item deleter
Last updated
Last updated
[data/dictionary/Item deleter]
Deletes an item from a dictionary by its key. If the item is not found, the original dictionary is forwarded. Example A:
{ "first": 1, "third": 3, "fifth": 5 } @0 received via dict
"first"@0 received via key
dict
sends { "third": 3, "fifth": 5 }@0
Example B:
{ "first": 1, "third": 3, "fifth": 5 } @0 received via dict
"second"@0 received via key
dict
sends{ "first": 1, "third": 3, "fifth": 5 }@0
More: https://github.com/Cranq-io/cranq-tutorials/tree/main/reference/2_constructing_data/2_1_setters_deleters
Keywords: dictionary, dict, delete, remove, key
dict: {string: any}
Receives the dictionary to delete the item from. Example: { "first": 1, "third": 3, "fifth": 5 }
key: string
Receives the key corresponding to the value to delete. Example: "third"
dict: {string: any}
Sends the resulting dictionary. Example: { "first": 1, "fifth": 5 }