FILTERMAP

Parameters

OrderNameTypeDesc
1originalmapThe map to be filtered
2filterkeyconstThe name of the map item to be searched for
3filtervalueconstThe value of the map item to allow

Returns

Places an map on the stack.

Description

This function filters the map (original). Any item that does not contain the specified filterkey and filtervalue will be removed.

For example, if you had the following map in your stack…

 [ { "name": "alpha",
     "colour": "orange",
     "style": "plain" },
    { "name": "beta",
      "colour":"blue",
      "style":"exotic"} ]
      

…then the command 'colour' 'blue' FILTERMAP will remove 'alpha' from your map, leaving only 'beta'.

See Also