title: AngularJS - ng-repeat when value starts with 'X'
body: <p>I have a $scope object:</p>
  
  <pre><code>"MyData": [
      {
          "CompareCode" : "A004",
          "CompareMessage" : "test test test, test test test",
      },
      {
          "CompareCode" : "X084",
          "CompareMessage" : "test test test, test test test",
      },
      {
          "CompareCode" : "A1025",
          "CompareMessage" : "test test test, test test test",
      },
      {
          "CompareCode" : "A1",
          "CompareMessage" : "test test test, test test test",
      },
      {
          "CompareCode" : "X52",
          "CompareMessage" : "test test test, test test test",
      },
      {
          "CompareCode" : "A541",
          "CompareMessage" : "test test test, test test test",
      }
  ]
  </code></pre>
  
  <p>Want to perform an <code>ng-repeat</code> but filter it on all items where CompareCode starts with an A.</p>
  
  <p>I have tried:</p>
  
  <pre><code>&lt;li ng-repeat="data in MyData | filter="data.CompareCode.indexOf('A')""&gt;
      {{ data.CompareMessage }}
  &lt;/li&gt;
  </code></pre>
  
  <p>However this doesn't seem to work.</p>