I have 2 set of data in my jsp page , one is a array list
and another is json data
. Now i want to parse both the data set and create my own drop downs .
Here is the sample Array List
named json_obj
data
["ABC-1","ABC-2","ABC-3","ABC-4","ABC-5","ABC-6"]
I tried this piece of code but not working
<select>
<option value="all_qns">All</option>
<c:forEach var="strategy" items="${json_obj}" varStatus="strategyLoop">
<option><c:out value="${strategyLoop[index]}"/></option>
</c:forEach>
</select>
Getting blank options
<select>
<option value="all_qns">All</option>
<option></option>
<option></option>
<option></option>
<option></option>
<option></option>
<option></option>
</select>
Also I do have this piece of json data
named json_obj_m
{"a":"1050","b":"1079","c":"1073","d":"1074"}
And I a=have tried this :
<c:forEach items="${json_obj_m}" var="met">
<option value="${met.key}">${met.value}</option>
</c:forEach>
But not working again getting error , that spring does not support key
.
Can anybody guide me where I am doing mistake, very new to Java/Spring . Thanks in advance.