StructMap()
Calls the given closure with every element in the given struct. the function returns a struct that contains all values returned by the closure.
StructMap( struct=struct, closure=function, parallel=boolean, maxThreads=number );
Returns: Struct
Examples
structmap examples
sct=structNew("linked");
sct.a=1;
sct.b=2;
sct.c=3;
writedump(var=sct, label="original struct");
// base test
res=StructMap(sct, function(key, value ){
return key&":"&value;
},true);
writedump(var=res, label="mapped struct");
See also
- Collections
- Structures
- Threads
- struct.map()
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)