I have an array of objects in my Angular app and each has a "ready" field, which is a timestamp. I want to count the number of objects where the ready timestamp is earlier than the current time. How would I do this?
I have:
$scope.getDatetime = new Date();
$scope.numberReady = $filter('filter')($scope.array, {ready < $scope.getDatetime}).length;
Obviously I can't use ready < $scope.getDatetime, but that, logically speaking, is what I want to do.