Object.has_key

Object.has_key

Object.has_key

Function

Determine whether the specified key exists in the object.

Syntax

Parameters

ParametersTypeRequiredDefault valueDescription
keyAnyNo''The key name to be checked will be converted to a string first when called.

Return value

TypeDescription
BoolReturns true if the key exists, false otherwise.

Example

Notes

  • Only checks the current object's own keys.