I have a Map
in EL as ${map}
and I am trying to get the value of it using a key which is by itself also an EL variable ${key}
with the value "1000"
.
Using ${map["1000"]}
works, but ${map["$key"]}
does not work. What am I doing wrong and how can I get the Map
value using a variable as key?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…