• 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
Creating complex arrays & dictionaries
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Creating complex arrays & dictionaries


  • Subject: Creating complex arrays & dictionaries
  • From: "Bobby B" <email@hidden>
  • Date: Tue, 30 May 2006 11:31:06 -0400

Hey guys

I've loaded my iTunes .xml file, and  can parse the data.  I want to
seperate the data out like so:

All the artists be in an array, and then for the artists, have a
grouping for albums, and then their songs.  This is an easy thing to
do in CoreData, but I'm trying to figure out the best way to do it via
arrays & NSDictionaries.

I was thinking like this:

Have an array named Artists, which is an arrray of dictionaries.
NSDictionary * artist, and the keys "Artist name", "Albums".  Where
artist name would essentially be a string object, and albums would be
an array.

And then the album dictionary would have the key "album name", and
then "songs". Where songs would be an array of their songs.

Would this be a good way to arrange this type of data?  Or would it be
better to have everything just in one fat array, and try to parse
through it as needed.

:)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: NSAppleScript not in the main thread
  • Next by Date: NSPredicate complex groups
  • Previous by thread: Re: Music File information
  • Next by thread: NSPredicate complex groups
  • Index(es):
    • Date
    • Thread