CFML Functions

structure Category functions

Function Name Description
StructAppend Appends all the data from struct2 into struct1, replacing duplicate keys unless specified by the overwrite flag
StructClear Removes all the data from the given structure
StructCopy Makes a copy of the structure and returns a brand new structure, copying all the data held within
StructCount Returns the number of elements within the structure
StructDelete Deletes the given key from the structure, optionally returning whether or not it was found before deletion
StructEach Applies the function to each of the elements in the structure
StructEquals Performs a deep comparison of two structures to see if they represent the same values
StructFilter Used to loop over the structure to create a new structure based on the inner function applied to each element that will return true/false if it is to be included
StructFind Returns the data at the given key, throwing an exception if it does not exist
StructFindkey Returns the data (or an array of all the values) at the given key, throwing an exception if it does not exist
StructFindvalue Returns the data (or an array of all the values) that matches the value, throwing an exception if it does not exist
StructGet Returns a new structure, or heirarchy of structures to match the given key path
StructInsert Inserts the key and value into the given structure, overwriting if already exists
StructIsempty Returns whether or not the structure is empty of all keys
StructKeyarray Returns back an array of all the keys in the structure
StructKeyexists Determines whether the given key exists in the structure
StructKeylist Returns all the keys in the structure as a delimited string
StructListnew Creates a new structure, that has a maximum number of items. It will maintain the insertion order of the structure.
StructNew Creates a new structure
StructSort Returns an array of all the keys, ordered by the sort criteria of the values in the structure
StructUpdate Inserts the key/value into the structure, overwritting if already exists
StructValuearray Returns all the values as an array