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

  • Home
  • SEARCH
  • 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 8929401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:39:55+00:00 2026-06-15T08:39:55+00:00

I am little confused about data type NSDictionary as it pertains to JSON structure

  • 0

I am little confused about data type NSDictionary as it pertains to JSON structure and need help. Here is my JSON output:

{
    "requestDetails":
    {
        "timeStamp":"2001-12-17T09:30:47-08:00",
        "transactionType":"QUERY",
        "action":"GET INVOICES",
    },
    "Payload":
    {
        "event":
        {
            "sourceRecordType":"INVOICE INQUIRY",
            "serviceRecordType":"INVOICE",
            "ownershipType":"EXPLICIT",
        },
    },
    "executionDetails":
    {
        "timeStamp":"2012-12-04T13:48:21-08:00",
        "statusType":   "SUCCESSFUL_TRANSACTION",
        "statusCode":"0",
        "DBRecordCount":"0",
        "processedRecordCount":"0",
        "warning":
        [
            {
                "errorCode":"257",
                "errorDescription":"Criteria specified is incorrect. Please Verify that the criteria is correct.",
                "__hashCodeCalc":false
            },
            {   "errorCode":"60",
                "errorDescription":"No results were found.  Please enter new search criteria.",
                "__hashCodeCalc":false
            }
        ],
    },
}

Now my understanding is this whole thing is dictionary and objectForKey:@”executionDetails” will give the following output:

{
        "timeStamp":"2012-12-04T13:48:21-08:00",
        "statusType":   "SUCCESSFUL_TRANSACTION",
        "statusCode":"0",
        "DBRecordCount":"0",
        "processedRecordCount":"0",
        "warning":
        [
            {
                "errorCode":"257",
                "errorDescription":"Criteria specified is incorrect. Please Verify that the criteria is correct.",
                "__hashCodeCalc":false
            },
            {   "errorCode":"60",
                "errorDescription":"No results were found.  Please enter new search criteria.",
                "__hashCodeCalc":false
            }
        ],
    }

How do I pick values within [] brackets. I tried valueForKey and ObjectForKey. I am not clear on processing structures and appreciate help

warning":
        [
            {
                "errorCode":"257",
                "errorDescription":"Criteria specified is incorrect. Please Verify that the criteria is correct.",
                "__hashCodeCalc":false
            },
            {   "errorCode":"60",
                "errorDescription":"No results were found.  Please enter new search criteria.",
                "__hashCodeCalc":false
            }
        ],

Thanks

  • 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-15T08:39:56+00:00Added an answer on June 15, 2026 at 8:39 am

    This is just an array. You can access its contents like so.

    NSDictionary *executionDetails = [json objectForKey:@"executionDetails"];
    NSArray *warnings = [executionDetails objectForKey:@"warning"];
    
    for (NSDictionary *warning in warnings) {
        NSLog(@"%@", warning);
    }
    // To access an individual warning use: [warnings objectAtIndex:0]
    

    You can also use modern Objective-C syntax to make it clearer:

    NSDictionary *executionDetails = json[@"executionDetails"];
    NSArray *warnings = executionDetails[@"warning"];
    NSLog(warnings[0]);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a little confused about how to use the cursor to access the data
I'm a little confused about implementing a doubly linked list where the data in
I'm a little confused about how reading data into a stream works in asio.
I am a little confused about streaming with WebClient (WC) Data is available and
I am a little confused about iPhone's accelerometer and gyro data. I had worked
I am a little confused about Accept-Encoding . I have Web Service which would
I am a little confused about the roles of a java application server and
I'm a little confused about something. I wrote an app and tested it on
I'm a little confused about the HTTP protocol, from what i know HTTP was
I am a little confused about where to use strong and where to use

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.