Here is a list I am working with:
$scope.Document.push( {
'Id': ''
'Name': "",
'mandatory': "false",
'status': "1"
},
{
'Id': ''
'Name': "",
'mandatory': "false",
'status': "2"
},
{
'Id': ''
'Name': "",
'mandatory': "false",
'status': "2"
});
I am looking to identify if there are multiple objects within the list that only have a status of 1, so I can perform a specific operation. How can I check the status in all objects?
if($scope.Document contains more than one object with status 1){
$scope.Document[index].status = 2;
}