title: Swift: How to filter in Core Data
body: <p>I'm using the following code to fetch all the data in "category". </p>
  
  <pre><code>let appDelegate = UIApplication.sharedApplication().delegate as AppDelegate
  
  let managedContext = appDelegate.managedObjectContext!
  let fetchRequest = NSFetchRequest(entityName:"category")
  let fetchedResults = managedContext.executeFetchRequest(fetchRequest, error: &amp;error) as [NSManagedObject]?
  </code></pre>
  
  <p>How do I only brings categories where the "type" is equal to "products"?</p>