$('#zip_code').on( "input", function() {
var zip = $(this).val().toUpperCase();
$('.select__control option').each(function(i){
var group = $(this).text();
if (group==zip) {
$(this).prop('selected', true).trigger('change');
}
else {
$('.select__control option').each(function(){
zip2 = zip.substring(0, zip.length - i);
var group2 = $(this).text();
if (group2==zip2) {
$(this).prop('selected', true).trigger('change');
return false;
}
});
}
});
});
Array ( [id] => 33 [user_id] => 1 [createdon] => 2020-02-12 11:22:15 [updatedon] => 2020-02-12 11:34:27 [num] => 2002/2 [cost] => 49470 [cart_cost] => 49470 [delivery_cost] => 0 [weight] => 0 [status] => 1 [delivery] => 5 [payment] => 3 [address] => 33 [context] => web [comment] => [properties] => [type] => 0 )