Description

Determines whether a variable is a structure.

IsStruct(variable)

Returns

True, if variable is a ColdFusion structure or is a Java object that implements the java.lang.Map interface. The return value is False if the object in variable is a user-defined function (UDF).

Category

Function syntax

IsStruct(variable)

See also

Structure functionsModifying a ColdFusion XML object in the Developing ColdFusion Applications

ColdFusion MX: Changed behavior: this function can be used on XML objects.

Parameters

Parameter

Description

variable

Variable name

Example

<cfscript>
    myStruct={}
    myStruct.name="ColdFusion"
    myStruct.version=2018
    myStruct.releaseYear=2018
    mystruct.releaseMonth="July"
    writeOutput("Is myStruct a struct: " & isStruct(myStruct) )
</cfscript>

Output

Is myStruct a struct: YES