Data Model Flex

    xmlns:mx="http://www.adobe.com/2006/mxml" 
     
    xmlns:s="library://ns.adobe.com/flex/spark">
    
    
            
            
            
    
    
    
        
            
            private function applyFilter():void
            {
                collection.filterFunction = filterFunc;
                collection.refresh();
            }
            
            private function filterFunc(value:Object):Object 
            {
                return (Number(value.age) > 21);
            }