In my Angular application, I am working with an array of objects that each contain a "ready" field storing a timestamp. My goal is to determine the count of objects where the "ready" timestamp is earlier than the current time. How can I achieve this?
This is what I currently have:
$scope.getDatetime = new Date();
$scope.numberReady = $filter('filter')($scope.array, {ready < $scope.getDatetime}).length;
It's clear that I cannot directly use ready < $scope.getDatetime
. However, conceptually, this is the comparison I aim to make.