how to find unique values in an object based on one property and then return that object code example
Example: javascript find unique values in array of objects
var flags = [], output = [], l = array.length, i;
for( i=0; i<l; i++) {
if( flags[array[i].age]) continue;
flags[array[i].age] = true;
output.push(array[i].age);
}