daily pastebin goal
76%
SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $scope.value =[{"Product":"Table","Country":"United States","id":"17619"},{"Product":"Chair","Country":"Pakistan","id":"17618"},{"Product":"Keyboard","Country":"Pakistan","id":"17617"},{"Product":"Chair","Country":"Pakistan","id":"17615"}]
  2.      
  3. $scope.getProduct = function(){return ($scope.values || []).map(function(w){return w.Product;}).filter(function(w,idx,arr){return arr.indexOf(w)===idx;});};
  4.      
  5. <select ng-model="product"><option ng-repeat="p in getProduct()" ng-model="filter[p]">{{p}}</option></select>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top