Skip to content

Instantly share code, notes, and snippets.

@jsvini
Created June 20, 2019 12:42
Show Gist options
  • Save jsvini/d51c72b13fb45e0704714af57d228265 to your computer and use it in GitHub Desktop.
Save jsvini/d51c72b13fb45e0704714af57d228265 to your computer and use it in GitHub Desktop.
console.table() all forms fields
$('form').each(function(){
var formData = $(this).serializeArray();
var compressed = {};
formData.forEach(function(field){
compressed[field.name] = (field.value)? field.value: '[empty]';
})
console.table(compressed);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment