Answer the question
In order to leave comments, you need to log in
How to get rid (execute) of js code in json in php?
Hello, how to get rid of js code inside json string?
There is json:
{"c":[{"v":new Date(2015,8,4),"f":"4 сент. 2015 г., 5:52 GMT-7"},{"v":0.0,"f":"0"}]}
Answer the question
In order to leave comments, you need to log in
What you get is not really JSON. Form valid JSON and it will be parsed normally. You can pass the date value either as a string obtained with Date.toString(), or as a number of milliseconds using Date.getTime();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question