Hello,
I have a service response with city names and there are duplicated city names in array response. When mapping them to a select component how can i eleminate the duplicated ones or just show the uniques?
Thanks,
I solved with add this js to success response :
code
var cities = {};
var options = Appery("il_select").find("option").each(function() {
if(cities[this.text]) {
$(this).remove();
} else {
cities[this.text] = this.value;
}
});
/code
It can help someone having this issue.