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 8485775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:44:35+00:00 2026-06-10T20:44:35+00:00

I got a NSDictionary that when I do a [currentOrder debugDescription] call on it

  • 0

I got a NSDictionary that when I do a [currentOrder debugDescription] call on it the layout is below, when I then do a:

[currentOrder valueForKey: @"itemOrder"]

It return it funny with the brackets as:

(
    "4 X ESPRESSO"
)

where it should only be (without brackets):

4 X EXPRESSO

Any idea why?

Content of currentOrder:

currentOrder: <__NSArrayM 0x68426c0>(
{
    extra1Select = 0;
    extra2Select = 0;
    extra3Select = 0;
    itemCost = 58;
    itemOrder = "4 X ESPRESSO";
    itemOrderDescription = "Cookie: YES, Sugar: YES";
    itemQuantity = 4;
    itemRestaurant = VidaECaffe;
    plistItem =     {
        cost = "11.5";
        description = "R11.50";
        extra1 =         {
            desc = Cookie;
            details =             (
                                {
                    cost = "3.00";
                    option1 = YES;
                },
                                {
                    cost = "0.00";
                    option2 = NO;
                }
            );
        };
        extra2 =         {
            desc = Sugar;
            details =             (
                                {
                    cost = "0.00";
                    option1 = YES;
                },
                                {
                    cost = "0.00";
                    option2 = NO;
                }
            );
        };
        itemRestaurant = VidaECaffe;
        level = 1;
        title = ESPRESSO;
    };
}
)
  • 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-06-10T20:44:37+00:00Added an answer on June 10, 2026 at 8:44 pm

    The problem is that currentOrder is not a dictionary but a NSArray containing a dictionary. The failure you are making next is that you use valueForKey: which is part of the key value coding family and not the designated access method for dictionaries (which is objectForKey:), and the array returns you a filtered array as a result…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got an NSDictionary that was initialized with a plist that, among other things,
We've got a NSString that we measure the bounding box of using - (NSSize)sizeWithAttributes:(NSDictionary
I've got a NSDictionary and I'd like put all of it's objects and keys
I've got a timer myTimer = [NSTimer scheduledTimerWithTimeInterval:x target:self selector:@selector(timerAction:) userInfo:[NSDictionary dictionaryWithObjectsAndKeys:y, @y, z,
For example, i got a method like this: - (void)addToRecents:(NSDictionary *)photo { NSUserDefaults *defaults
Got a seg fault from my memcpy that gdb can't give me anything else
I've got an iPhone app that loads a bunch of TableViews. The first time
I've got a method that when put a breakpoint in it and hover over
I got problem with core data, I had a table that exactly look like
I've got a MKMapView and I'm adding annotations like this: for (NSDictionary *tmp in

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.