'jquery: data is showing only 3 characters after using substring
I have some problem in jQuery. the below is the array in JSON format.
If user type AAA then it should fetch the records from starting 3 characters. Currently, It is showing only 3 characters found but does not show full data.
var airports = ["AAA-Anaa, Anaa, French Polynesia", "AAC-El Arish-El Arish-Egypt-EG", "AAE-Annaba, Annaba, Algeria", "AAL-Aalborg, Aalborg, Denmark"]
index file has :
url: 'js/airport.json',
getValue: $.each(a, function(key, value) {
alert(key)
});
,
list: {
match: {
enabled: true
}
}
};
$('#fromairports').easyAutocomplete(options);
$('#toairports').easyAutocomplete(options);
$('#destination').easyAutocomplete(options);
$('#multicityfrom').easyAutocomplete(options);
$('#multicityto').easyAutocomplete(options);
```
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
