Implement a basic JavaScript function to filter and sort an array of objects based on multiple properties.