<%
arraySize = myarray.size;
for(def i=0; i<arraySize; i++)
{
def phone = myarray[i]["value"];
def type = myarray[i]["key"];
}
%>
iterating through an associative array in JSP
-
22-09-2022 - |
Question
this is what i have myarray=[[value:32423412412, key:Home], [value:12312323123, key:Other], [value:12312313232, key:Other], [value:23423523523, key:Work], [value:1312321, key:Work]]
how can i iterate and get both the value and the key for all? thanks
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow