On Mon, Mar 23, 2009 at 2:53 PM, Ben Einstein wrote:
> I'm filtering an array of dictionaries, my usual procedure for doing this
> is:
>
> NSPredicate *predicate = [NSPredicate predicateWithFormat:@"MyKey
> CONTAINS[cd] %@", searchString];
> NSArray *filteredArray = [[self dataArray]
> filteredArr
I'm filtering an array of dictionaries, my usual procedure for doing
this is:
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"MyKey
CONTAINS[cd] %@", searchString];
NSArray *filteredArray = [[self dataArray]
filteredArrayUsingPredicate:predicate];
So your comment about lowerca
On Mon, Mar 23, 2009 at 5:18 PM, Ben Einstein wrote:
> So is there any way to filter with numberic keys? I guess I could convert
> all they keys to strings? Urgh
First, arrays don't have keys. I'm assuming you mean you need to
filter the items based on values for keypaths off those objects.
Sorry, typo, I meant FILTER an array.
So is there any way to filter with numberic keys? I guess I could
convert all they keys to strings? Urgh
Is there any way to filter using all keys in a dictionary?
Thanks for you help (so far!)
Ben
On Mar 23, 2009, at 5:13 PM, Kyle Sluder wrote:
On
On Mon, Mar 23, 2009 at 5:03 PM, Ben Einstein wrote:
> I was wondering if anyone knows how to use NSPredicate on values with keys
> that are NSNumbers (or any non-NSString, for that matter). I've poured over
> the documentation and tried many things, from converting to a string to %K,
> %d, etc ar
Hi,
I was wondering if anyone knows how to use NSPredicate on values with
keys that are NSNumbers (or any non-NSString, for that matter). I've
poured over the documentation and tried many things, from converting
to a string to %K, %d, etc argument substitutions and nothing seems to
work.