StructFindKey

Description

Searches recursively through a substructure of nested arrays, structures, and other elements, for structures whose values match the search key in the value parameter.

Return value

An array that contains structures with values that match value.

Category

Structure functions

Syntax

StructFindKey(top, value, scope) 

See also

Structure functions

Parameters

Parameter Description
top
ColdFusion object (structure or array) from which to start search. This attribute requires an object, not a name of an object.
value
String or a variable that contains one for which to search.
scope
  • one: returns one matching key. Default.
  • all: returns all matching keys

Usage

Returns an array that includes one structure for each of the specified values it finds. The fields of each of these structures are:

A structure's keys are unordered.

Example

<cfset aResults = StructFindKey( #request#, "bass" )>

Comments