In short, I am looking for the correct predicate format to index into a dictionary attribute on an object.
I have an array of myObject instances, each with an attribute CPDictionary(NSMutableDictionary) extAttributes and I am trying to allow filtering based on values in extAttributes. I am defining my predicate as follows
[CPPredicate predicateWithFormat:@"extAttributes[%K] like[c] %@",key,val]
I am not sure what the correct key-path would be for this. Reading the documentation on NSPredicate it would seem that "extAttributes[%k]" might be an index into an array, not a dictionary. I have tried several alternatives and this is the only one that doesn't error. When inspecting the resulting objects, the expressions in the predicate object appear to be correct. However, it doesn't have the intended result.