User Guide
120 Developing Web Applications with ColdFusion
called person to hold value of key as loop runs --->
<CFLOOP COLLECTION=#Departments# ITEM="person">
<TR>
<TD>#person#</TD>
<TD>#Departments[person]#</TD>
</TR>
</CFLOOP>
</TABLE>
</CFOUTPUT>
Structure Functions
There are several functions that help you create and manage structures in ColdFusion
applications.
Structure Functions
Function Description
IsStruct
Returns TRUE if the specified variable is a structure.
StructClear
Removes all data from the specified structure.
StructCopy
Returns a new structure with all the keys and values of the
specified structure.
StructCount
Returns the number of keys in the specified structure.
StructDelete
Removes the specified item from the specified structure.
StructFind
Returns the value associated with the specified key in the
specified structure.
StructInsert
Inserts the specified key-value pair into the specified
structure.
StructIsEmpty
Indicates whether the specified structure contains data.
Returns TRUE if the structure contains no data, and FALSE if it
does contain data.
StructKeyArray
Returns an array of keys in the specified structure.
StructKeyExists
Returns TRUE if the specified key is in the specified structure.
StructKeyList
Returns a list of keys in the specified structure.