How can I modify this example so it can get values from checkboxes that aren\'t checked?
I want all checkboxes to have a value, if it hasn\'t been checked I want to get
var fields = $("form").serializeArray(); $('form input[type=checkbox]').map(function() { if( !this.checked ) { fields.push({ name: this.name, value: "off" }); } });