jQuery template language: How to loop int in a list

105 Views Asked by At

Suppose in a Java controller there is an endpoint which will return a JSON string containing:

sizeList: [1,2,3,4]

In the frontend JSP, if I use jQuery template language to loop through it, like this:

{{each sizeList}}
{{/each}}

How can I display the 1,2,3,4 output in the JSP?

1

There are 1 best solutions below

0
JoseLuis On

OK, I self confirm it. The Jquery template do not support auto un-box. Not support in controller has List, it must has List, and each Item has value properties to contain an Integer