each

Same as collectionEach expect it has the two additional optinal params parallel and maxThreads

each(collection, closure [, parallel] [, maxThreads]) → returns void

This function requires Lucee. Not supported on Adobe ColdFusion.

each Argument Reference

collection any
Required

closure function
Required

parallel boolean

maxThreads numeric
Default: 20

Examples sample code invoking the each function

coll = [{
    id: 0,
    name: 'me'
},{
    id: 1,
    name: 'you'
}];
function outputCollection(item) {
    writeOutput(item.name);
    writeOutput(' - ');
}
each(coll,outputCollection,true);

Expected Result: me - you -


Fork me on GitHub