Return the value of a item in a dict by a given key.
If the key is not found then the return value will be nil, unless an alternative
return value is given.
This function does not generate a change.
dict.get(name, [alt])
| Argument | Type | Description |
|---|---|---|
| name | uuid/int/str (required) | The key where to return the value for. |
| alt | any (optional) | Optional return value. |
Returns the value for the given key. If the key is not found then the
return value will be nil, unless an alternative return value is given as second argument.
This code shows an example use case of get():
tmp = dict([["name", "Iris"]]);
tmp.get('name');
Return value in JSON format
"Iris"