var array = [{"name":"Joe", "age":17}, {"name":"Bob", "age":17}, {"name":"Carl", "age": 35}];
var unique = [];
var distinct = [];
for(var i = 0; i < array.length; i++ ){
if(!unique[array[i].age]){
distinct.push(array[i]);
unique[array[i].age] = 1;
}
}
gs.info(distinct);