Replies: 3 comments
-
@jecfarolan360 If you intend to filter the cities by their names, you can do a needle-haystack search using |
Beta Was this translation helpful? Give feedback.
-
I'm sorry. I am complicated which is the right term, remove or filter duplicates but my intention is if there is two same city name is showing, I want to show only one in the dropdown/input box. |
Beta Was this translation helpful? Give feedback.
-
@jecfarolan360 Oh, okay, Since you have the cities stored in mounted() {
this.countryCities = [ ...new Set(this.countryCities) ]
} You already got it right |
Beta Was this translation helpful? Give feedback.
-
Hello, does anyone knows how to filter/remove the duplicates cities or by their name only? Based on this note
I tried this one in vue js
this.countryCities = [ ...new Set(this.countryCities) ]
Beta Was this translation helpful? Give feedback.
All reactions