I have a code similar to the following.
MyRequests.cors_request("POST", APP_CONFIG.APP_URL+"/users/selectAllUsers", null, function ok(users) { $scope.usersNotFiltered = users; console.log('users--->', users); console.log('$scope.userPerSystem--->', $scope.userPerSystem); // delete the items that is already exists in the userPerSystem function filterUsers(element, index, array) { console.log("$scope.usersNotFiltered :: " + users); commonFindAndRemove($scope.usersNotFiltered, 'userId', element.userId); console.log('a[' + index + '] = ' + element.userId); } $scope.userPerSystem.forEach(filterUsers); $scope.users = $scope.usersNotFiltered; },
And I run the tihs code and watch the console. What is the difference between "[Object]" and "Object Object" in the chrome console?
Users ---> [Object, object, object, object, object, object, object, object, object, object, object, object, object, object, object, object, object, object]
$ scope.userPerSystem ---> [Object] 0: Objectlength: 1__proto__: Array [0] redca-ias.concat.js: 5258
<object> Object object, Object object, Object object, Object object, Object object, Object object, Object object, Object object, Object object, Object object, Object object, Object object, Object object, Object object, Object object, Object object, object object ], [object-object], [object-object], [object-object], [object-object], [object-object], [object-object], [object-object], [object-object], [object to object]