Skip to content

Instantly share code, notes, and snippets.

@javajosh
Created December 13, 2010 20:42
Show Gist options
  • Save javajosh/739568 to your computer and use it in GitHub Desktop.
Save javajosh/739568 to your computer and use it in GitHub Desktop.
//I like this function! Too bad I didn't need it in the end.
//requires: jquery
function objectToFormInput(obj){
var result = '';
$.each(obj, function(key,value){
result += '<input type="hidden" name="'+key+'" value="'+value+'" />';
});
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment