Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
You show the plist as being an array of dictionaries but the code you show loads the plist as a dictionary. Assuming it's really an array then load the plist into an array. Then you iterate the array just like any other array to access its members.
 
You've made the same error as your original post, but in reverse.

Your original code was wrong because you were loading an <array> plist into an NSDictionary.
Your latest code is wrong because you're loading a <dict> plist into an NSMutableArray.

These data structures are not interchangeable.

You must load a <dict> plist file into an NSDictionary (or its subclass NSMutableDictionary). Similarly, an <array> plist file must be loaded into an NSArray (or its subclass NSMutableArray).
 
i see, i have change it. now how can i get the key value, 11231654?

as in i would to have a NSString = *number;
number will be equal to 11231654, so that i can use number to compare will others.

thks for the help!

Think it through. There's nothing difficult here.

How do you usually retrieve the object for a key from an NSDictionary?
With objectForKey:.

Since plist keys are always strings (Ref. 1),you can use any expression that results in a numeric NSString object. Examples:
Code:
@"11231654"

[NSString stringWithFormat:@"%i", 11231654]

[[NSNumber numberWithInteger:11231654] stringValue]

someLabelContainingNumbers.text


(Ref. 1)
http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man5/plist.5.html
When using CFDictionary as a property list, all keys must be strings.
 
hi, thks for the reply.

if i use:
Code:
array3 objectForKey:@"11231654"

i will be "looking" at the array inside the key 11231654, correct?

how can i "look at" the key(s) inside array3?

correct me if, i am wrong, but i should not be using objectforkey here.

What "key(s) inside array3"? It's an array. It doesn't have keys. What you have done is to return the NSArray object whose key is "11231654" that is stored in the plist. If you want to get at the contents of the array, you do so in the same way as any other NSArray. If you look at the contents of the plist that you posted, you will see that the key "11231654" contains two string objects. No keys are specified for them.

So, yes, you should use objectForKey: to return the NSArray object, and then fast enumeration or a simple for loop to iterate through it and work on the objects it contains. Of course, you will need to be sure that array3 is of the correct type (i.e. that it is an NSArray, not an NSDictionary).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.