I have successfully perform the $.post ajax call, but can not able to fetch data after some specific operation, 

```
if ($updateUserResult) {
        $response ['userId'] = $userId;
    }

    json_encode ( $response );

```

where `$updateUserResult` is boolean. on my js file 

```
submitHandler: function (form) {
    var data = $(form).serialize();
    $.post("test.php", data).done(function( response ) {
         console.log(response);
      });
    return false;
}

```

console log displays empty. Am I missing somthing or the flow is wrong..??