var newage_group = age_group.filter(function(element,index,self){ return self.indexOf(element) === index; });