It will no longer be JSON. But you can aftermarket processed JSON:
json.some_code = eval(json.some_code);
However, this can be dangerous (script injection, etc.).
So, if you can, do this instead:
json = { key1 : "val1", key2: "val2", elem: "someid", html:"test" }; document.getElementById(json.elem).innerHTML=json.html;
arnaud576875
source share