[Vuejs]-Sort a filtered array

0👍

I think this might work

computed: {
countries() {
  let arr = [...new Set(this.hotels.map(h => h.country))]
  return arr.sort()
}

Also if this does not work, then how does your [...new Set(this.hotels.map(h => h.country))] looks like.

Leave a comment