title: RealmSwift + Multiple Predicate
body: <p>I have no idea how to combine predicate based on user selection. Here is an overview of my data.</p>
  
  <p>Person.swift</p>
  
  <pre><code>class Person: Object {
  
     let id = RealmOptional&lt;Int&gt;()
     dynamic var name = ""
     dynamic var console = ""
  
     override static func primaryKey() -&gt; String {
        return "id"
  }
  </code></pre>
  
  <p>sample json data</p>
  
  <pre><code>{
   "id": 822,
   "name": "Ron",
   "console": "XBox"
  },
  {
   "id": 823,
   "name": "Jenny"
   "console": "Playstation 4"
  }
  </code></pre>
  
  <p>say for example i have alot of data and console consist of either "XBox", "Playstation 4", "Wii", "Sega" or "PS Vita". I create a checkbox filtering option to allow user to selected the option they want to filter and show the name of the person who owns which console.</p>
  
  <p>For example if they select both "XBox" and "Playstation 4" how do i predicate them both and show the result of the person name? Currently i can only show one option like this.</p>
  
  <pre><code>var player: Results&lt;Person&gt;!
  
  func filter(sender: AnyObject) {
      let realm = try! Realm()
      self.player = realm.objects(Person).filter("%K = %@", "console", "XBox")
  }
  </code></pre>