title: angularjs foreach loop issue
body: <p>I'm new to AngularJS and I'd like to build an <code>object</code> with data from a <code>json</code> file.</p>
  
  <p>This is my <code>json</code> file:  </p>
  
  <pre><code>[
    {"id": 1, "name": "user1", "select": false },
    {"id": 2, "name": "user2", "select": false },
    {"id": 3, "name": "user3", "select": false },
    {"id": 4, "name": "user4", "select": false },
    {"id": 5, "name": "user5", "select": false }
  ]
  </code></pre>
  
  <p>And now I want to use <code>foreach</code> loop to check which user has got <strong>select == true</strong> and push this username to new <code>array</code>. So here is my first Try:</p>
  
  <pre><code>'use strict';
  
  angular.module('apiOmat', [])
  
  
    .controller('UsersCtrl', function($scope, $http){
      $http.get('users.json').then(function(usersResponse) {
        $scope.users = usersResponse.data;
      });
  
  
  $scope.submit = function(message,title){
  
  var tempArr = [];
  angular.forEach($scope.users.name, function(value,key){
   tempArr.push(value);
  });
  
  console.log(tempArr);
  
      $scope.messagebody = '{ "title" = "' + title + '", "message" = "' + message  + '"}'; 
  }
  
   });
  </code></pre>
  
  <p>I also tried this:</p>
  
  <pre><code>  $scope.submit = function(message,title){
  
      var tempArr = [];
      angular.forEach($scope.users, function(value,key){
       tempArr.push( { key :  value } );
      });
  
      console.log(tempArr);
  </code></pre>
  
  <p>The Console logs the 5 object, but without any value. Just 
  1: Object
  2: Object
  3: Object 
  ...</p>
  
  <p>I know that the query for true or false is missing. But I want to fix this step before adding a query.</p>