I am currently developing an application using Spring MVC with MongoDB.
In the collection, I have retrieved multiple image name values:
Ex: 1.jpg, 2.jpg, 3.jpg....
My Query:
Now I need to place these values inside double brackets [[]]
Ex : [["1.jpg","2.jpg","3.jpg"]]
Below is a snippet of my code:
<script type="text/javascript">
var slices = [];
<c:forEach var="items" items="${LiteCOLL.dwi}" varStatus="status">
<c:forEach items="${items.TTP}" var="item">
slices.push("${item}");
</c:forEach>
</c:forEach>
var params = [];
var data = [["1.jpg","2.jpg","3.jpg"]];
params["images"] = data;
</script>
I have attempted some solutions but have been unable to resolve the issue.