structSome

This function calls a given closure/function with every element in a given struct and returns true, if one of the closure calls returns true

structSome(struct, function(key, value [,struct]){} [, parallel] [, maxThreads]) → returns boolean

Member Function Syntax

struct.some(function(key, value [,struct]){} [, parallel] [, maxThreads])

This function requires Lucee.  Not supported on Adobe ColdFusion, etc.

structSome Argument Reference

struct struct
Required

callback boolean
Required

Closure or a function reference that will be called for each of the iteration.

Callback parameters:

  • key*string : The key for the current iteration
  • value*any : The value for the current iteration
  • struct*struct : A reference of the original struct

parallel boolean
Default: false

Lucee 4.5+ true if the items can be executed in parallel
Values:
  • true
  • false

maxThreads numeric
Default: 20

Lucee 4.5+ the maximum number of threads to use when parallel = true

Links more information about structSome


Fork me on GitHub