I have an array that passed from spring controller to view in thymleaf template.but when I am trying to assign it in a javascript variable it appends double quote at the end of it which I don't want.The assigned array is following-
var array="[1,2,3,5]";
but I want the array will be like this-
var array=[1,2,3,5];
JSON.parse(array).