StructReduce
Method Signature
StructReduce(struct=[structloose], callback=[function], initialValue=[any])Arguments
Argument
Type
Required
Description
Default
Examples
Script Syntax
rainbow = {
"Red" : "Whero",
"Orange" : "Karaka",
"Yellow" : "Kowhai",
"Green" : "Kakariki"
};
ui = structReduce( rainbow, ( Any previousValue, Any key, Any value ) => {
return previousValue & "<dt>#key#</dt><dd>#value#</dd>";
}, "<dl>" ) & "</dl>";
writeDump( rainbow );
writeOutput( ui );
Using Member Function
Additional Examples
Related
Last updated
Was this helpful?
