How do we convert java array list of String objects to java script array?
This is what I am doing but I am looking for a better way to do it. I dont want to iterate over the array list.
var myArray = [
<c:forEach items="${myList}" var="item">
{itemName: "${item.name}"},
</c:forEach>
];
Thanks.