0

I have a string with , comma separated and a Map. Here is what i'm trying to get in below code. <c:out value="${myUserMap}"/>
o/p

 {1=All, 2=Admin, 3=Manager, 4=Guest}

<c:forTokens items="1,2,3,4" delims="," var="mySplit">
            <c:out value="${mySplit}"/>
           <c:out value=" ${myUserMap[mySplit]}"/>
</c:forTokens>

By using the above code i'm able to get all comma separated values. If im trying to use ${myUserMap[2]} to get the corresponding values of a map from the splitted string. I'm not getting the value.if i use two level iterator im able to get values. but i need to get values within a single iteration

Cheers.

Sundar G
  • 1,069
  • 1
  • 11
  • 29
  • Now im able to understand wr i missed...https://stackoverflow.com/questions/924451/el-access-a-map-value-by-integer-key – Sundar G Oct 30 '17 at 09:34
  • 2
    Possible duplicate of [EL access a map value by Integer key](https://stackoverflow.com/questions/924451/el-access-a-map-value-by-integer-key) – Sundar G Oct 30 '17 at 09:35

0 Answers0