| CFML Reference
|
|
ColdFusion Functions
|
StructFindValue
Description
Searches recursively through a sub-structure of nested arrays, structures, and other elements and returns an array containing any structures with values that match the search key specified in the value parameter.
Syntax
StructFindValue( top, value [, scope])
See also
StructDelete, StructFind, StructGet, StructInsert, StructIsEmpty, StructKeyArray, StructKeyExists, StructKeyList, StructCount, StructNew, StructUpdate, StructSort, StructFindKey, StructAppend
Parameters
| Parameter |
Description |
top
|
The ColdFusion object (either a structure or an array) from which to start the recursive search. It is the object not the name of the object.
|
value
|
The string to search for. The type must be a simple object, arrays and structures are not supported.
|
scope
|
Optional. Specifies whether one or all of the matching keys should be returned. Valid entries for the Scope parameter are "ONE" and "ALL" (default is "ONE.")
|
Usage
Returns an array of structures, one structure for each find of the specified value. If no matches are found, an array is still returned but its size is 0. The fields of each of these structures are:
Key: Name of the key in which the specified value was found
Path: String which could be used to reach the found key
Owner: Parent object which contains the found key
Example <CFSET aResults = StructFindValue( #request#, "235" )>
|
Copyright © 2001, Macromedia Inc. All rights reserved. |
|
|