Skip to content

Instantly share code, notes, and snippets.

@mgrubinger
Last active November 22, 2018 13:44
Show Gist options
  • Save mgrubinger/1a71ad0b769bf908fc0f12151dfd2af2 to your computer and use it in GitHub Desktop.
Save mgrubinger/1a71ad0b769bf908fc0f12151dfd2af2 to your computer and use it in GitHub Desktop.
jQuery Form Data to Array
var data = $(this).serializeArray().reduce(function(obj, item) {
obj[item.name] = item.value;
return obj;
}, {});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment