Model with inner array predicate in iOS swift || Dictionary with inner array predicate
Solution:
In iOS models cannot be able to predicate with inner array.So you can convert the model into dictionary and predicate with multilevel inner arrays.
In model you cannot be able to access the model properties directly from predicate.
You can use ANY with inner array predicates like below
CODE:
let Predicate = NSPredicate(format: "ANY lists.Lists.name contains[cd] %@", searchText)
it has
lists -> Lists -> name
Comments
Post a Comment