StructFindValue

Description

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

Returns

An array that contains structures with values that match the search key value. If none are found, returns an array of size 0.

Category

Structure functions

Function syntax

StructFindValue( top, value [, scope])

See also

Structure functions; Structure functions in Using Arrays and Structures in ColdFusion MX Developer's Guide

Parameters

Parameter Description

top

ColdFusion object (a structure or an 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.

The type must be a simple object. Arrays and structures are not supported.

scope

  • one: function returns one matching key (default).
  • all: function returns all matching keys.

Usage

The fields of each structure in the returned array are:

A structure's keys are unordered.

Example

<cfset aResults = StructFindValue( #request#, "235" )>

View comments in LiveDocs