structKeyExists

Determines whether a specific key is present in a structure.

structKeyExists(structure, key) → returns boolean

Member Function Syntax

struct.keyExists(key)

structKeyExists Argument Reference

structure struct
Required

Name of structure to test

key string
Required

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