Set Dictionary Value
Set Dictionary Value
Section titled “Set Dictionary Value”Type: dict-set · Package: Collections Activities v1.0.0
Assigns or updates a key→value pair in a dictionary. If the key does not exist, it creates it; if it already exists, replaces its value.
How it works
Section titled “How it works”It puts value under the key key in the dict dictionary.
Required parameters
Section titled “Required parameters”| Parameter | Editor | Description |
|---|---|---|
dict | expression | The dictionary. |
key | expression | The key (text). |
value | expression | The value to assign. |
Example
Section titled “Example”Create Dictionary outputVariable = totalesPorCiudadFor Each items = = ventas itemVariable = v └─ activities: Set Dictionary Value dict = = totalesPorCiudad key = = str(v["Ciudad"]) value = = num(v["Total"])Related activities
Section titled “Related activities”- Get Dictionary Value — read a value.
- Dictionary Contains Key — check if the key exists.