Remove Dictionary Key
Remove Dictionary Key
Section titled “Remove Dictionary Key”Type: dict-remove · Package: Collections Activities v1.0.3 · Output: none
Removes the entry (key and its value) from a dictionary. If the key does not exist, it does nothing.
How it works
Section titled “How it works”Removes from dict the entry whose key is key (converted to text). It modifies the dictionary directly: any variable pointing to it sees the change. Removing a key that does not exist is not an error, so you can use it without checking first.
Required parameters
Section titled “Required parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
dict | Dictionary | — | The dictionary. |
key | string | — | The key to remove. |
Optional parameters
Section titled “Optional parameters”None.
Output
Section titled “Output”This activity does not return a value; it modifies the dictionary in place.
Common errors
Section titled “Common errors”| Message | Cause and fix |
|---|---|
'dict' must be a Dictionary, got …. | dict is not a dictionary (the message shows the type received, or null). |
'key' cannot be null. | The key expression returned null. |
Example
Section titled “Example”Remove Dictionary Key dict = config key = "temporary"Dictionary Count dict = config → output: remainingRelated activities
Section titled “Related activities”- Set Dictionary Value — add or update a key.
- Dictionary Contains Key — check whether it exists.