I have array in twig sent by php script.
You can access the each value as in html file like this below.
{% for a in myArray %}
{{a.date}}{{a.high}}
{% endfor %}
However Now I want to put the data in each object. How can I do this??
<script>
for (var i = 0; i < length; i++) {
chartData[i] = ({
date: newDate,//to use value from twig array!!
high: high,
low: low,
});
</srcipt>