I am trying to convert my List of Doubles in EL to a Array in JavaScript for use further on with Google Charts.
But i am stuck here in the snippet it sees the var prices as an array of Characters.
<head>
${requestScope.prices} <!-- gives [130.98, 130.84, 133.23, 130.32] -->
<p id="demo"></p>
<script type='text/javascript'>
var prices = "${requestScope.prices}";
document.getElementById("demo").innerHTML = prices[2]; //Gives 3
</script>
</head>