Send data from Python backend to Highcharts while escaping quotes for date
Highcharts expects the values on datetime axes to be timestamps (number of miliseconds from 01.01.1970). Date.UTC is a JS function that returns a timestamp as Number. Values surrounded by apostrophes are Strings.
I'd rather suggest to return a timestamp as a String from backend (e.g. '1514764800000') and then convert it to Number in JS (you can use parseInt function for that.)
I would highly appreciate any help on this. I'm constructing dynamic highcharts at the backend and would like to send the data along with html to the frontend. 
In highcharts, there is a specific field to accept Date such as:
x:Date.UTC(2018,01,01)
or x:2018-01-01. However, when I send dates from the backend, it is always surrounded by quotes,so it becomes: x:'Date.UTC(2018,01,01)'
and x:'2018-01-01', which does not render the chart. Any suggestions on how to escape these quotes?