Dictionary Contains Key
Dictionary Contains Key
Section titled “Dictionary Contains Key”Type: dict-contains-key · Package: Collections Activities v1.0.0 · Output: boolean
Checks if a dictionary contains a key and saves true/false to a variable. Use it before reading a value to avoid unexpected nulls.
How it works
Section titled “How it works”Checks whether key key exists in dict and saves the result to outputVariable.
Required parameters
Section titled “Required parameters”| Parameter | Editor | Description |
|---|---|---|
dict | expression | The dictionary. |
key | expression | The key to check. |
outputVariable | nombre de variable | Variable where to save the result. |
Example
Section titled “Example”Dictionary Contains Key dict = = config key = "timeout" outputVariable = tieneIf condition = = !tiene └─ then: Set Dictionary Value dict = = config key = "timeout" value = 30000 // valor by defaultRelated activities
Section titled “Related activities”- Get Dictionary Value — read the value after the key is confirmed.
- Set Dictionary Value — assign a value.