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

Was it helpful?

Solution

<%
arraySize = myarray.size;
for(def i=0; i<arraySize; i++)
{
   def phone = myarray[i]["value"];
   def type = myarray[i]["key"];
}
%>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top