• 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
Re: Dictionaries within a dictionary - getAllValuesForKey:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dictionaries within a dictionary - getAllValuesForKey:


  • Subject: Re: Dictionaries within a dictionary - getAllValuesForKey:
  • From: "Daniel T. Staal" <email@hidden>
  • Date: Thu, 7 Jun 2007 09:14:49 -0400 (EDT)
  • Importance: Normal

On Thu, June 7, 2007 8:27 am, Jofell Gallardo said:
> Is there such a method? I just want to get all values that I could get
> for a dictionary of dictionaries (or array of dictionaries).
>
> e.g. I have a collection of dictionaries with key "xackupid". I want to
> collect on a single call all the possible values for xackupid.
>
> How can I do this?

1. Enumerate the outer set.

2. Step through outer set.

3. On each step, collect the value from the inner dictionary.

There isn't an 'automatic' way to do it that I know of, but it can be done
in about four lines of code.

Daniel T. Staal

---------------------------------------------------------------
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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

References: 
 >Dictionaries within a dictionary - getAllValuesForKey: (From: "Jofell Gallardo" <email@hidden>)

  • Prev by Date: Dictionaries within a dictionary - getAllValuesForKey:
  • Next by Date: Re: codeSense
  • Previous by thread: Dictionaries within a dictionary - getAllValuesForKey:
  • Next by thread: Re: Dictionaries within a dictionary - getAllValuesForKey:
  • Index(es):
    • Date
    • Thread