JQuery serialisieren Formdaten zum Objekt
var data = {};
$(".form-selector").serializeArray().map(function(x){data[x.name] = x.value;});
Old-fashioned Orangutan
var data = {};
$(".form-selector").serializeArray().map(function(x){data[x.name] = x.value;});
var form_data = $('#add_post').serializeArray(); //encode in JSON string
var post_title = form_data[0].value;
var post_description = form_data[1].value;