Calls the given closure with every element in the given struct.

The function returns a struct that contains all values returned by the closure. closure=function, parallel=boolean, maxThreads=number )

Returns: Struct

Argument Description
function, required

filter can be a function/closure that implements the following constructor

[function(string key, any value[, struct struct]):any].

Alias: function, callback, udf

boolean, optional

execute closures parallel

number, optional

maximum number of threads executed, ignored when argument "parallel" is set to false


original = {
	    "one": {
	        1: "map"
	    "two": {
	        2: "struct"
	    "three": {
	        3: "mapstruct"
	    "four": { 
	        4: "structmap"
	function mapOriginal(k,v) {
	    return v[ListFirst(v.keyList())];
	fixed = original.Map(mapOriginal);
	writeDump([original, fixed]);

See also