NSPredicate on array of arrays

后端 未结 2 485
温柔的废话
温柔的废话 2020-12-18 08:37

I have an array, that when printed out looks like this:

(
        (
        databaseVersion,
        13
    ),
        (
        lockedSetId,
        100
    )
)
         


        
2条回答
  •  我在风中等你
    2020-12-18 08:45

    Simply you can use ANY in NSPredicate:

    it's works fine

    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"ANY SELF == %@", @"value"];
    

    or

    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"ANY SELF contains[cd] %@", @"value"];
    

提交回复
热议问题