title: Filtering out objects with empty property from ng-repeat array
body: <p>I have this array in scope:</p>
  
  <pre><code>$scope.randomArray = [
        {
          prop1: 'val1',
          prop2: {
            value: '3',
            unit: 'l'
          }
        },
        {
          prop1: 'val2'
        },
        {
          prop1: 'val3',
          prop2: {
            value: '10',
            unit: 'l'
          }
        }
      ];
  </code></pre>
  
  <p>Trying to make an ng-repeat through this only with objects having <code>prop2</code> property set. I would not create a separate filter or scope function for this if not necessary, so I've tried this solution described <a href="https://stackoverflow.com/questions/25177004/ng-repeat-filter-for-where-an-attribute-is-undefined">here</a> and <a href="https://stackoverflow.com/questions/28383084/filter-on-property-even-if-it-doesnt-exist">here</a>:</p>
  
  <pre><code>&lt;div ng-repeat="random in randomArray | filter : { prop2 : '!!'}"&gt;
    {{random}}
    &lt;/div&gt;
  </code></pre>
  
  <p>but it not works.</p>
  
  <p>Here is the mcve: <a href="https://codepen.io/neptune01/pen/eWRBKd" rel="nofollow noreferrer">https://codepen.io/neptune01/pen/eWRBKd</a></p>