← Back to Posts

angular.js dedup array filter

👤 علی ذوالفقار 📅 1402/02/27 10:34:06 👁️ 324 views
  app.filter('dedup', function() {
    return function(input) {
        var dedupedArray = (input) ? input.filter((item, pos) => input.indexOf(item) === pos) : '' ;            
        return dedupedArray;
    } 
  });
← Back to Posts