title: NSPredicate filtering over array of complex objects
body: <p>So, basically, the problem is, I have an object, let's call it "Product"</p>
  
  <pre><code>struct Product {
    let categories: [Category]
  }
  </code></pre>
  
  <p>And  Category looks like this:</p>
  
  <pre><code>struct Category {
    let id: Int
  }
  </code></pre>
  
  <p>What I need, is to create NSPredicate, that would check if categories list contains Category of certain id. Now sure if it's possible, but maybe there's better workaround than creating another property with simple Int array?
  Update: NSPredicate is mandatory because I need to use it in Realm database filter query.</p>