If I have some json that looks like this:
[
{"y": 0.964, "x": "2013-10-17T18:23:11.244418+00:00"},
{"y": 0.979, "x": "2013-10-17T18:23:11.244455+00:00"}
...
]
How do I create a javascript object that uses identifiers instead of quoted strings as keys, like this:
[
{ y: 0.964, x: "2013-10-17T18:23:11.244418+00:00"},
{ y: 0.979, x: "2013-10-17T18:23:11.244455+00:00"}
...
]
Not sure if this is important, but for context, I am manipulating some data with python, then serializing with json.dumps(..)
and passing the result of json.dumps(..)
as a context variable to a Django html template. Then I want to plot the data using Rickshaw (http://code.shutterstock.com/rickshaw/). I have not dealt with converting the time to epoch yet.