title: Angular filter json object
body: <p>I'm trying to implement a filter based on the answer to this <a href="https://stackoverflow.com/questions/17793751/how-to-filter-by-object-property-in-angularjs">question</a>, but it isn't working for me. For code:</p>
  
  <pre><code>function MyCtrl($scope, $timeout)
  {
      $scope.tweets = [
          {
              created_at: "Date",
              text: "tweet text",
              users: 
              [
                  {
                      name: "user name",
                      screen_name: "user screen name",
                      profile_image_url: "profile pic"
                  },
                  {
                      name: "user name 2",
                      screen_name: "user screen name 2",
                      profile_image_url: "profile pic"
                  }
              ]
          },
          {
              created_at: "Date",
              text: "tweet text 2",
              users: 
              [
                  {
                      name: "user name",
                      screen_name: "user screen name",
                      profile_image_url: "profile pic"
                  },
                  {
                      name: "user name 2",
                      screen_name: "user screen name 2",
                      profile_image_url: "profile pic"
                  }
              ]
          },
          {
              created_at: "Date",
              text: "tweet text 3",
              users: 
              [
                  {
                      name: "user name",
                      screen_name: "user screen name",
                      profile_image_url: "profile pic"
                  },
                  {
                      name: "user name 2",
                      screen_name: "user screen name 2",
                      profile_image_url: "profile pic"
                  }
              ]
          }
      ];
  }
  </code></pre>
  
  <p>and the template: </p>
  
  <pre><code>&lt;div ng-app ng-controller="MyCtrl"&gt;
      &lt;div ng-repeat="tweet in tweets"&gt;
          for each tweet, user 2's name should be printed here &gt;&gt;
          {{(tweet.users | filter:{screen_name:'user screen name 2'}).name}}
          _____________________________________
      &lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>I'm seeing output of: </p>
  
  <p>for each tweet, user 2's name should be printed here >> </p>
  
  <hr>
  
  <p>for each tweet, user 2's name should be printed here >> </p>
  
  <hr>
  
  <p>for each tweet, user 2's name should be printed here >> </p>
  
  <hr>
  
  <p>I would expect that "user name 2" would be printed out after each ">>". I don't know why that filter isn't working on an array of each iterated element. Thanks.</p>
  
  <p><a href="https://jsfiddle.net/n94a2c16/4/" rel="nofollow noreferrer">fiddle</a></p>