Hi Guys
I am having the following string object and I want to create a JSON object out of it and store it in MongoDB.
var strMYDATA = '{"Name":"ABC","SignedDate" : ISODate("2013-04-02T09:07:42.282Z")}';
I tried the following to create a JSON object out of strMYDATA
var JSONobj = JSON.parse(strMYDATA);
console.dir(JSONobj);
Getting the following error:
undefined:1
"Name":"ABC","SignedDate" : ISODate("2
^
SyntaxError: Unexpected token I
at Object.parse (native)
Could anyone know how to parse the string with ISO date field like above in Node.JS?
Note: Cannot change the strMYDATA content because it a serialized object received from other Node.JS restful API.
Thanks
AVADHESH PATEL
02-Apr-2013