<%@ taglib prefix="c" uri="http://java.sun.com/jstl/ea/core" %> JSTL: EcmaScript EL Support -- Simple Map Access Example

Map Access

In EcmaScript you can access the key and corresponding value of the Map.Entry object directly.

Here is an example:

Customer list of system properties

Map.Entry Object Value Key
prop


There are also provisions to access values in a Map by explicitly specifying the key using the index operator. If the keys are strings, this will even work using standard property access syntax, i.e. $map.key

Examples:

Expression Value
$numberMap[7]
$stringMap['eight']
$stringMap.nine
$stringMap[variable]