In a Django view, I create a dataset something like this:
data = [22, 23, 18, 19, 21, None, 22, 20]
I pass this data to a JavaScript variable using:
data_json = simplejson.dumps(data)
For use in High Charts script.
Unfortunately, JavaScript is encountered when it encounters a value of None
, because in fact I need null
. How can I best replace None
with null
, and where do I need it - in a Django view or in JavaScript?
source share