StructReduce()

Iterates over every entry of the given struct and calls the closure with every key/value.

This function will reduce the struct to a single value and will return this value.

StructReduce( struct=struct, closure=function, initialValue=object );

Returns: any

Argument Description
struct
struct, required

struct to iterate

Alias: structure, object

closure
function, required

function/closure that implements the following constructor

function(result, key, value, st) { return result; }

Alias: function, callback, udf

initialValue
object, optional

initial value passed as part of the first closure call

Alias: initial, initalValue

Examples

Non-Member Function

See also