Map Comprehension Expression

A map comprehension expression evaluates to a Map of key-value pairs. The map entries are defined by the expressions in the reportMap part, one entry for each variable combination of the from part that fulfills the optional boolean predicate in the with part. When no with part is given, all combinations result in an entry.

The result map does not contain duplicate keys. When multiple variable combinations result in the same key value, the resulting map will contain the last entry.

Syntax:
from
   <var> : <set expression> [, <var> : <set expression> ...]
[ with
   <boolean expression> ]
reportMap
   <key expression> -> <value expression>
end
Example:
from v:V{structure.NamedElement} with v.qualifiedName <> "" reportMap v.qualifiedName -> v end from v:V reportMap getId(v) -> v end