$(".ccon :input").each(function(){ //console.log($(this).attr("name")); data[$(this).attr("name")]=$(this).val(); });