Skip to main content

Remove item from dictionary

Sophie avatar
Written by Sophie
Updated over a week ago

Definition and Usage

This command removes a specified key-value pair from a dictionary. It allows you to delete an entry from a dictionary by specifying its key.

Parameter Values

Input parameters

Parameter

Description

Possible Values

Required

Options / Notes

Dictionary

Select or enter the dictionary variable from which you want to delete the key-value pair

Any dictionary variable

Yes

Must be a valid dictionary object

Key

Enter the key to remove from the dictionary

Any valid key

Yes

The key must exist in the dictionary to be removed

Error handling

Parameter Name

Description

Throw error & stop

When an error occurs, the action will trigger an error and stop the execution of the entire app.

Retry command

If an error occurs, the action will retry the command in an attempt to resolve the issue and continue the process.

Ignore error & continue

When an error occurs, the action will be ignored, and the workflow will continue without interruption.

Variables produced

This action doesn't produce any variables.


Using Variables in Conditions

You can use variables in the parameters of this command. Look for the {x} icon which indicates that you can insert previously defined variables. This is particularly useful when:

  • The key you want to remove is stored in a variable

  • The dictionary you're modifying is dynamically determined


Notes

  • If the specified key does not exist in the dictionary, the command may generate an error depending on your error handling settings

  • This command permanently removes the key-value pair from the dictionary; the operation cannot be undone

  • To check if a key exists before attempting to remove it, consider using a condition check before this command

Did this answer your question?