title: How to remove dynamically created dropdown option in AngularJS?
body: <p>I have posted my code. I want to remove <code>Kanhu</code> from my options.</p>
  
  <p>See the working example.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var myApp = angular.module('myApp',[]);
  
  function myCtrl ($scope) {
     $scope.userProfiles = [
       {id: 10, name: 'Chinmay'},
       {id: 27, name: 'Sanjib'},
       {id: 35, name: 'Kanhu'},
       {id: 38, name: 'Pradeepta'},
       {id: 39, name: 'Debsish'},
    ];
    $scope.selectedUserProfile= $scope.userProfiles[1].id;
  
    $scope.existingId = 35;
   
  };</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"&gt;&lt;/script&gt;
  &lt;div ng-app="myApp" ng-controller="myCtrl"&gt;
    Name
    &lt;select  id="requestorSite" ng-model="selectedUserProfile" ng-options="userProfile.id as userProfile.name for userProfile in userProfiles"&gt;
    &lt;/select&gt;
    &lt;br/&gt;
    &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Here is 5 names coming in the dropdown but I want to remove <code>kanhu</code> from my dropdown options. Can you please say me how to remove that?</p>
  
  <p>I have tried to use filter <code>userProfile.id as userProfile.name for userProfile in userProfiles | filter:{id: !existingId}</code> this one not working.</p>