[Vuejs]-How to create new component data based on existing in Vue.js

4👍

If I understand you correctly what you want is a computed property.

If so, you can do it as simple as this:

data() {
  return {
    channels: [],        
  }
},

computed: {
  popularChannels: function() {
    return this.channels.filter(function(item) {
      return item.popular
    });
  }
}

Leave a comment