I work with framework scalatra , I declare my array in this manner up the page .ssp
<% @ val table_activity: Array [String]%>
usually if I want to extract data from middle of the page .ssp :
<% for ( x <- 0 to table_activity.length-1) { %>
<tr>
<td>
<%=table_activity(x) %>
</td>
</tr>
<% } %>
but in my case I want to manage my data in javascript function and I have no idea how to do it!! if you have idea please help me