structKeyExists

Determines whether a specific key is present in a structure.

structKeyExists(structure, key) → returns boolean

Member Function Syntax

struct.keyExists(key)

Argument Reference for the structKeyExists function

structure

Required: Yes
Name of structure to test

key

Required: Yes
Key to test

Examples sample code invoking the structKeyExists function


Check if server struct has OS key

structKeyExists(server, "os")

Expected Result: YES


Check if server struct has OS key using member function

CF 11+ calling the keyExists member function on a struct.

server.keyExists("os")

Expected Result: YES


Fork me on GitHub