Sets an item in a dict. If the key already exists, the old value will be overwritten.
This function generates a change.
dict.set(name, value)
| Argument | Type | Description |
|---|---|---|
| name | uuid/int/str (required) | The key of the item to set. |
| value | any (required) | The value to assign to the key. |
The value that was set.
This code shows how to use set():
d = dict();
d.set(42, 'The answer to everything!');
Return value in JSON format
"The answer to everything!"