Skip to content

Instantly share code, notes, and snippets.

@alokstha1
Created May 3, 2018 12:14
Show Gist options
  • Save alokstha1/9c143c6fe9e37c4e121ef0aa05b940db to your computer and use it in GitHub Desktop.
Save alokstha1/9c143c6fe9e37c4e121ef0aa05b940db to your computer and use it in GitHub Desktop.
Get json_encode() value from php in jquery
var data = {
'action': 'update_resume_viewed',
'post_id': post_id,
'user_id': user_id,
dataType : 'json',
}
jQuery.post(jobifySettings.ajaxurl, data, function(response) {
console.log(response.success);
console.log(response['success']);
console.log(response);
}, 'JSON');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment