Skip to main content
Version: 8.2411.x.x RR

map

map:values

Collection map:values(Map map)

Returns the values of a map.

#{map:values(map)}

map:getValueOrDefault

Object map:getValueOrDefault(Map map, Object key, Object default)

Searches a value in a map by a key and returns a default if it is not found.

#{map:getValueOrDefault(map, key, default)}

Deprecated name: ctx:getValueOrDefault

map parameter

The map containing the data to search.

key parameter

The key used to access the data.

default parameter

The default value return if no value is found for the given key.

map:hasKey

boolean map:hasKey(Map map, Object key)

Checks whether a map contains a given key.

#{map:hasKey(map, key)}

Deprecated name: ctx:hasKey

map:isEmpty

boolean map:isEmpty(Map map)

Checks whether the given map is empty.

#{map:isEmpty(out.appl.members)}

map:keys

Set map:keys(Map map)

Returns the key set of a map.

#{map:keys(map)}

map:mapValues

Object map:mapValues(Object data, Map map, boolean unique)

The function iterates over the data if it is a collection and uses its items to look up a new value in the specified map. If the unique flag is set, the resulting list will contain each value only once.

The function can also be applied to single data items instead of collections.

#{map:mapValues(in.user.roles, cfg.roleMapping, true)}