$('select.companySale').select2();
$('select.productCategory').select2();
$('select.productUnit').select2();
$('select.productJutalekKATA').select2();
$('select.productNormal').select2();
$('select.companyCity').select2();
$('select.companyCounty').select2();
$('select.companyCountry').select2();
$('select.companyLocationCity').select2();
$('select.companyLocationCounty').select2();
$('select.companyLocationCountry').select2();
$('select.companyPostalCity').select2();
$('select.companyPostalCounty').select2();
$('select.companyPostalCountry').select2();

$('button.savedata').on('click',function(e){
  var allAttributes = jQuery('input.form-control,select.form-control').map(function() { /* example: .class */
    let record = {key:$(this).attr('name'),value:$(this).val()};
    return record; /* example: id */ 
  }).get();
  $("#sendForm").submit();
});