Determines if a given key exists in a dict.
This function does not generate a change.
dict.has(key)
| Argument | Type | Description |
|---|---|---|
| key | uuid/int/str (required) | Key to check. |
Returns true if the given key is found in the dict and otherwise false.
This code shows an example use case of has():
d = dict([[42, "The answer to everything"]]);
/* Check if the dict has a key 42 */
d.has(42);
Return value in JSON format
true