StructKeyExists

Tests whether a key exists in a struct and returns a boolean value

Method Signature

StructKeyExists(struct=[structloose], key=[any])

Arguments

Argument
Type
Required
Description
Default

struct

struct

true

The struct to test

key

any

true

The key within the struct to test for existence

Examples

Check if server struct has OS key

Run Example

structKeyExists( server, "os" );

Result: true

Check if server struct has OS key using member function

CF11+ calling the keyExists member function on a struct.

Run Example

Result: true

Additional Examples

Run Example

Last updated

Was this helpful?