title: Angularjs filter not null for an object in Select ng-options:
body: <p>I am trying to filter out items which are objects &amp; not <code>null</code> in angular 1.5.6.  </p>
  
  <p>I tried all options from this <a href="https://stackoverflow.com/questions/18644412/angularjs-filter-not-null">post</a>.</p>
  
  <p>Still cannot make it to work. </p>
  
  <p>Only 'Sally' should be shown in the <code>select</code> </p>
  
  <p>Here is the <a href="http://jsfiddle.net/hp84op9g/3/" rel="nofollow noreferrer">fiddle</a></p>
  
  <p><strong>HTML :</strong></p>
  
  <pre><code>&lt;div ng-app="myApp" ng-controller="myCtrl"&gt;
     &lt;br&gt;
  
       &lt;select ng-model="a" ng-options="detail.name for detail in details | filter:{shortDescription:'!null'} track by detail.name"&gt;
    &lt;/select&gt;
  
      &lt;br&gt;
      New 
  
       &lt;select ng-model="b" ng-options="detail.name for detail in details | filter:{shortDescription: ''} track by detail.name"&gt;
    &lt;/select&gt;
  
      &lt;br&gt;
      All
      &lt;select  ng-model="c" ng-options="detail.name for detail in details | filter:{shortDescription: '!!'} track by detail.name"&gt;
    &lt;/select&gt;
  
    &lt;br&gt;
    Without any filter
    &lt;select ng-model="d" ng-options="detail.name for detail in details track by detail.name"&gt;
    &lt;/select&gt;
    &lt;!-- --&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>Script :</strong> </p>
  
  <pre><code>function myCtrl($scope) {
      $scope.details = [{
          name: 'Bill',
          shortDescription: null
      }, {
          name: 'Sally',
          shortDescription: {'MyName':'A girl'}
      }];
  }
  
  angular.module("myApp",[]).controller("myCtrl", myCtrl);
  </code></pre>