javascript - how to html form post - file uploading and reading json response from php server - Stac
try json_decode. $data = ({"code":0, "message":"success"}); $array = json_decode($data, true); by passing 2nd parameter to true you will get response in array instead of object. the array will be then populated as follow: array (size=2) 'code' => int 0 .....