Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6870383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:40:37+00:00 2026-05-27T03:40:37+00:00

I have a plist like this: <dict> <key>New item</key> <dict> <key>document</key> <string>driving licence</string> <key>Overview</key>

  • 0

I have a plist like this:

<dict>
<key>New item</key>
<dict>
    <key>document</key>
    <string>driving licence</string>
    <key>Overview</key>
    <string>a driving licence is required.......</string>
</dict>

if I want to get the object I would write something like this:

 myString = [somedictionary objectForKey:@"Overview"];

what about if I want to get “overview” from my plist???
I Hope it’s clear….. Please do not give negative vote…. I’m still learning!;-)

EDITED VERSION:

Better to be more specific:

i have this code

 for (NSDictionary *playDictionary in playDictionariesArray) {
        Play *play = [[Play alloc] init];
        play.name = [playDictionary objectForKey:@"playName"];

which is the Apple sample code:
http://developer.apple.com/library/ios/#samplecode/TableViewUpdates/Introduction/Intro.html

In this sample the string play return the name of the play in the header section but I want
to modify it and get the “Key” in the header (in this case would be “PlayName).

THANKS TO EVERYBODY: THIS IS HOW I FIXED IT:

 NSMutableArray *anArray = [[NSMutableArray alloc] init];
    [anArray addObject:@"Overview"];
    [anArray addObject:@"pre-requirements"];
    [anArray addObject:@"where"];
    [anArray addObject:@"what"];


    //Use a for each loop to iterate through the array
    for (NSString *s in anArray) {

            Play *play = [[Play alloc] init];
            play.name = s;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T03:40:38+00:00Added an answer on May 27, 2026 at 3:40 am

    You can get an array of all the keys in the dictionary using [dict allKeys]. You can get an array of all keys whose value is a specific object using [dict allKeysForObject:object]. You can process the keys one-by-one in a loop like this:

    for (NSString *key in dict) {
        ...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a .plist file that looks like this: <plist version=1.0> <array> <dict> <key>name</key>
I have a .plist file containing a dictionary item, something like this: <dict> <dict>
If I have a plist which is structured like this: Root Array Item 0
I have the following plist: <plist version=1.0> <array> <dict> <key>description</key> <string>Dodge Viper</string> <key>title</key> <string>Bil</string>
I have created a PLIST. The structure of the PLIST is like this <?xml
I have a favorites plist file when I try to load it like this
I have a plist with the following structure: <plist version=1.0> <dict> <key>000001</key> <dict> <key>name</key>
I have a data-structure (in plist) that looks something like this: What i have
So I have a plist structured string, that get dynamically (not from the file
I have saved all my files using something like this NSString *fileName = [NSString

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.