title: Filter ng-repeat results using an id variable stored in controller
body: <p>I have an id in my controller, let's say <code>id = 1</code>, and a list of data items <code>$scope.items = data</code>. 
  The data structure looks like this :</p>
  
  <pre><code>"data": [ {
           "id":1,
           "name":"ranjith"
       },
       {
          "id":2,
          "name":"sumanth"
       }
  ]
  </code></pre>
  
  <p>My HTML</p>
  
  <pre><code>&lt;span ng-repeat="item in items | filter: getResult"&gt;{{item.name}}&lt;/span&gt;
  </code></pre>
  
  <p><code>getResult</code> in my controller:</p>
  
  <pre><code>$scope.getResult = function(a){ if (a.id== $scope.id) return true; else return false; }
  </code></pre>
  
  <p>I want to output only the item with <code>id=1</code> means the data set with <code>id=1</code> and <code>name=ranjith</code>. I tried some codes but nothing seems to work.</p>