I am trying to check if there is a discrepancy in the ages of objects within an array.
$scope.myArray = [{name:'ted', age:'18', gender: 'm'},
{name:'bob', age:'18', gender: 'm'},
{name:'ben', age:'19', gender: 'm'}
];
Let's iterate through them...
angular.forEach($scope.myArray, function(value, key) {
console.log(value.age);
//logs 18, 18, 19
//how do I determine if one of the ages is unique?
});