This function calls a given closure/function with every element in a given struct and returns true, if all of the closure calls returns true
structEvery(struct, closure [, parallel] [, maxThreads])
returns boolean
struct.every(closure [, parallel] [, maxThreads])
Name | Type | Required | Default | Description |
---|---|---|---|---|
struct | struct | Yes | ||
closure | function | Yes | ||
parallel | boolean | No | ||
maxThreads | numeric | No | 20 |
Here we have simple example about structevery function. It is supported only in Lucee.
var struct = {"Name":"Dhar","Age":"20","Country":"US"};
structevery(struct,function(key,value){
writeOutput(key & ":" & value & " ");
return true;
});
Here we have simple example about structevery member function. It is supported only in Lucee.
var struct = {"Name":"Dhar","Age":"20","Country":"US"};
struct.every(function(key,value){
writeOutput(key & ":" & value & " ");
return false;
});