Unable to properly read json encoded success/failure statuses sent by Cake PHP controller function handling Ajax call
问题 My problem is somewhat similar to cakephp, jquery, .ajax(), dataType: json, but my observations are little different. I am working on a Cake PHP project. Consider a group_assoc submodule of opstools module. So, there is this function group_assoc() inside opstools_controller.php which is invoked by an ajax call to update group associations. My ajax post is like this - $.post( url, function(data) { if(data) { alert(data.success); //alerts -> undefined alert(data); //alerts -> {"success":true}