Skip to content

Instantly share code, notes, and snippets.

@sergio-fry
Created June 11, 2010 16:12
Show Gist options
  • Save sergio-fry/434694 to your computer and use it in GitHub Desktop.
Save sergio-fry/434694 to your computer and use it in GitHub Desktop.
;(function($){
jQuery.fn.serializeJSON = function(){
var aData = $(this).serializeArray();
var result = {}
for(key in aData){
result[aData[key].name] = aData[key].value;
}
return result;
}
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment