/** * Special Effects AJAX framework command. */ Drupal.ajax.prototype.commands.bookingEmailIDs = function(ajax, response, status) { jQuery(function($) { var arr = $.parseJSON($('input#booking_email_default_ids').val()) alert(arr.first()); // this will be executed after the ajax call }); }