Description
Searches recursively through a substructure of nested arrays, structures, and other elements, for structures whose keys match the search key in the value parameter.
Returns
An array that contains structures with keys that match value.
Category
Function syntax
StructFindKey(top, value, scope) |
See also
Structure functions; Structure functions in the Developing ColdFusion Applications
Parameters
Parameter |
Description |
---|---|
top |
ColdFusion object (structure or array) from which to start search. This parameter requires an object, not a name of an object. |
value |
String or a variable that contains one for which to search. |
scope |
|
Usage
Returns an array that includes one structure for each of the specified keys it finds. The fields of each of these structures are:
- Value: value held in the found key
- Path: string that can be used to reach the found key
- Owner: parent object that contains the found key
A structure's keys are unordered.
Example
<cfset aResults = StructFindKey( cookie, "CFID" )> |