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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:08:30+00:00 2026-06-13T18:08:30+00:00

Example of JSON: Note: The Docs array is one of the many different arrays

  • 0

Example of JSON:

Note: The “Docs” array is one of the many different arrays in this large
array.

 {
        "Docs": {
            "Title1": {
                "id": "1",
                "active": "0",
                "title": "xxx",
                "date": "October 22, 2012",
                "description": "Description here",
                "ext": "DOCX",
                "when": "Tuesday, October 23",
                "subject": "French",
                "author": "xx xD",
                "email": "xx.xx@gmail.com",
                "day": "Tuesday, October 23",
                "dl": "9 downloads"
            },
            "Title2": {
                "id": "2",
                "active": "0",
                "title": "Vocab, Page 64",
                "date": "October 22, 2012",
                "description": "Description goes here",
                "ext": "XLSX",
                "when": "Tuesday October23",
                "subject": "French",
                "author": "xxxxxx",
                "email": "xxx@yahoo.com",
                "day": "Tuesday October23",
                "dl": "3 downloads"
            }
        }

How do I make an NSDictionary that gets the title of the “Docs” array (Docs) and also gets the count of the number of arrays in the docs array, for example? Thanks. I am very confused in how to do this.

  • 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-13T18:08:31+00:00Added an answer on June 13, 2026 at 6:08 pm

    Something like this:

    NSError *e = nil;
    NSDictionary *JSON = [NSJSONSerialization JSONObjectWithData:data options: NSJSONReadingMutableContainers error: &e];
    

    Once you get the deserialized data, you can iterate through the dictionary to read the elements. To get the count of number of objects:

    // Get your object "Docs" from the root object
    NSDictionary *dictionaryObject = (NSDictionary *)[JSON objectForKey:@"Docs"];
    
    // Get the count by counting the keys
    NSArray * allKeys = [dictionaryObject allKeys];
    NSLog(@"Count : %d", [allKeys count]);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am outputting json data from a php file (example of my output) {news:[{title:title
I'm a beginner with Json, I follow this tutorial the example I have written
I have JSON data like this [ 00-00-02:first one, 00-00-04:the second, 00-00-09:third, . .
I have this example where I am trying to access json value, but it
Example JSON (note that the string has trailing spaces): { aNumber: 0, aString: string
My JSON response is an array of Object (Folder for example). I would like
I have an example json as below: { Passwd:String content, Userme:String content } how
For example lets say I have a JSON object that contains states and cities.
In the example for coding with Json using Databinder Dispatch Nathan uses an Object
For example, if I have the following json texts: object1{ field1: value1; field2: value2;

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.