• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSPredicate or Collection operators?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSPredicate or Collection operators?


  • Subject: NSPredicate or Collection operators?
  • From: Alex Zavatone <email@hidden>
  • Date: Mon, 13 Jul 2015 10:35:02 -0400

Hi all.  I've got a dictionary of objects that contain properties and need to check if one object has a certain value.

I was thinking I could use collection operators and build an array where the value of an an object's property matches that I'm looking for.

Then if the array contains that value, we have a match.

If each objects in the array has a bunch of properties and one of those properties is called "thing", how would I build an array where the contents of thing would equal a certain value?

I'm sure I could walk the array, but I expect there is a more efficient method already built in to Cocoa for this.

Thanks in advance.

Alex Zavatone
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: NSPredicate or Collection operators?
      • From: Alex Zavatone <email@hidden>
  • Prev by Date: [PSA] native AppleScripting support for Swift
  • Next by Date: Re: NSPredicate or Collection operators?
  • Previous by thread: Re: [PSA] native AppleScripting support for Swift
  • Next by thread: Re: NSPredicate or Collection operators?
  • Index(es):
    • Date
    • Thread