I need to convert a string into a JSON Object using JavaScript. However, when I do so, the date in the original string gets completely changed.
Here is the string I am working with:
var JsonData=[[2013-02-27,787],[2013-02-26,131],[2013-02-02,0],[2013-01-20,8],[2012-12-28,12]]
To convert it to a JSON object, I use the following code:
var json = eval( JsonData );
But then I receive the following unexpected result in an alert:
1984,787,1985,131,2009,0,1992,8,1972,12
Can someone please provide guidance on how to solve this issue?
Recently, I encountered the following error:
Timestamp: 3/7/2013 1:10:36 PM
Error: TypeError: this.proxy.getTime is not a function
It seems like the error might be related to the incorrect conversion of dates in the JSON object. Can anyone offer advice on resolving this?