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

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

Convert NsNumber, NSDate to String in iOS Swift

Global LocationManager Singleton class iOS Swift