The below code returns [ ] in the console:
var postdata = {}; $.each($(\'#form\').serializeArray(), function() { postdata[this.name] = this.value; }); va