I am sending a JSON object from js to post.php

```
$.ajax({
    type:'post',
    url:'post.php',
    data:{jsonobject:json_str}
});

```

but I am not able to retrieve the result in a post.php file

```
$obj = jsonString2Obj($_POST['jsonobject']);
echo $obj->people->user;

function jsonString2Obj($str){
    return json_decode(stripcslashes($str));
}

```