title: Swift predicate that returns matches on a Core Data transformable string array
body: <p>I have a Core Data entity which has an attribute called <code>likedMovies</code> which is a String array <code>[String]</code>.  This is configured as a Transformable attribute.</p>
  <p>I populate a list of IDs inside this attribute, so for example:</p>
  <p>User entity:<br />
  <code>name = Duncan | likedMovies = [524, 558, 721]</code><br />
  <code>name = Saskia | likedMovies = [143, 558, 653]</code><br />
  <code>name = Marek  | likedMovies = [655, 323, 112]</code></p>
  <p>I would like to write a predicate which returns all <code>User</code> entities where the <code>likedMovies</code> array contains a given value.  I have tried the predicate below but it doesn't work - for the id 558, instead of returning <code>[Duncan, Saskia]</code> I get no entities returned.</p>
  <p><code>fetchRequest.predicate = NSPredicate(format: &quot;%@ IN %@&quot;, &quot;558&quot;, &quot;likedMovies&quot;)</code></p>
  <p>Thank you in advance for your help.</p>
  <p><a href="https://i.stack.imgur.com/6rcaX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6rcaX.png" alt="enter image description here" /></a></p>