CollectionEach

call the given UDF/Closure with every entry (key/value) in the given collection.

CollectionEach( collection, closure )

Returns: void

Argument Description
collection
object, required

collection to take values from

closure
function, required

UDF/Closure that call with the entries from struct

Examples

people = [ { name = "Alice", age = 32 }, { name = "Bob", age = 29 }, { name = "Eve", age = 41 }];
CollectionEach(people, function(p) { dump(p.name); });
// member function
people.each(function(p) { 
  dump(p.name);
});

See also