Menu
[code=php]$file_name = $res[‘fileName’];
$file = file_get_contents($file_name);
$obj = json_decode($file,true);
echo $_GET[‘callback’] . ‘(“‘ . json_encode($obj) . ‘”);’;
That’s my script.
this is the .json file
[code=html]{“topic”:{“prefix”:”www.mysocialbeacon.com/files/tutorial/”,”slides”:[{“prefix”:”general/”,”topic”:”General”,”img”:”1.png”,”title”:”Welcome”]}}
basically I’m trying to return it to a javascript file and it’s wrapping quotes around the wrong part. Here’s the beginning of the response
“{“topic”:{“prefix”:”www.mysocialbeacon.com/files