I'm trying to write some Javascript code where I need to use a model attribute. Here is how I define the script tag:
<script type="text/javascript" th:inline="javascript">
/*<![CDATA[*/
//need some loops
/*]]>*/
</script>
What I need to do is, using each
iterations over model attributes inside the script. So far I couldn't manage to do this with th:each
. Any help is appreciated.
JSP
?JSON
object? and useThymeleaf
to iterate. I am not familar withThymeleaf
.