js-object-to-json
js-object-to-json copied to clipboard
Problem converting data that has functions inside
Hi! Thank you for you project! I hope it can help me to parse data from a JS file. I have a following example of JS data:
var some_data = {data: s("London")};
where s
is a translation function used in JS code. I need to get an array or PHP object from that.
Unfortunately, such code can't be processed with the json_decode
function that you use under the hood. It says Syntax Error
.
If I call convertToJson
I get:
{"data":"s(""London")}
Double quote appears, which should not be there. Do you think if there's any workaround for that?