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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:40:33+00:00 2026-06-15T23:40:33+00:00

I’m in a bit over my head here (a lot actually). I have a

  • 0

I’m in a bit over my head here (a lot actually). I have a JSON response that’s been converted to an NSDictionary. It’s a mess of nested arrays and dictionaries within dictionaries within arrays, etc… I have no clue what to do with it. What I would like to do is make a simple NSDictionary for each “item” and use the properties to drive a UITableView. I don’t know how to access objects several levels down. I’ve done a bit of searching and i see there’s several ways to go about it (fast enumeration, blocks, etc..) but before I start spinning my wheels I’d love to know what would be best for my particular situation. I saved the NSDictionary as a plist for readability. I’ll post it here:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>search_result</key>
    <dict>
        <key>latitude</key>
        <string>51.508129</string>
        <key>longitude</key>
        <string>-0.128005</string>
        <key>page</key>
        <string>1</string>
        <key>per_page</key>
        <integer>3</integer>
        <key>results</key>
        <array>
            <dict>
                <key>result</key>
                <dict>
                    <key>description_short</key>
                    <string>Experience the history and mystery of the most famous sites in the South of England!</string>
                    <key>flex_reference</key>
                    <string>FLX-LON-77B-D2F-5ED5</string>
                    <key>geocoded_latitude</key>
                    <string>51.5081289</string>
                    <key>geocoded_longitude</key>
                    <string>-0.128005</string>
                    <key>name</key>
                    <string>Stonehenge, Glastonbury, Avebury and Chalice Well</string>
                    <key>primary_image</key>
                    <string>http://media.****.com/FLX-LON-77B-D2F-5ED5-image_original-56.jpg</string>
                    <key>product_categories</key>
                    <array>
                        <dict>
                            <key>product_category</key>
                            <dict>
                                <key>kind</key>
                                <string>type</string>
                                <key>name</key>
                                <string>Sightseeing Tours</string>
                            </dict>
                        </dict>
                        <dict>
                            <key>product_category</key>
                            <dict>
                                <key>kind</key>
                                <string>category</string>
                                <key>name</key>
                                <string>Excursion</string>
                            </dict>
                        </dict>
                        <dict>
                            <key>product_category</key>
                            <dict>
                                <key>kind</key>
                                <string>type</string>
                                <key>name</key>
                                <string>Attractions</string>
                            </dict>
                        </dict>
                    </array>
                </dict>
            </dict>
            <dict>
                <key>result</key>
                <dict>
                    <key>description_short</key>
                    <string>Experience some of the most famous landmarks in English history, University City of Oxford, rolling countryside and honey stoned cottages of the Cotswolds and Stratford upon Avon home of the famous English plyright, William Shakespeare.</string>
                    <key>flex_reference</key>
                    <string>FLX-LON-2AD-267-38AB</string>
                    <key>geocoded_latitude</key>
                    <string>51.5081289</string>
                    <key>geocoded_longitude</key>
                    <string>-0.128005</string>
                    <key>name</key>
                    <string>Oxford, Stratford and the Cotswolds Villages</string>
                    <key>primary_image</key>
                    <string>http://media.*****.com/FLX-LON-2AD-267-38AB-image_original-AF.jpg</string>
                    <key>product_categories</key>
                    <array>
                        <dict>
                            <key>product_category</key>
                            <dict>
                                <key>kind</key>
                                <string>type</string>
                                <key>name</key>
                                <string>Sightseeing Tours</string>
                            </dict>
                        </dict>
                        <dict>
                            <key>product_category</key>
                            <dict>
                                <key>kind</key>
                                <string>category</string>
                                <key>name</key>
                                <string>Excursion</string>
                            </dict>
                        </dict>
                        <dict>
                            <key>product_category</key>
                            <dict>
                                <key>kind</key>
                                <string>type</string>
                                <key>name</key>
                                <string>Attractions</string>
                            </dict>
                        </dict>
                    </array>
                </dict>
            </dict>
            <dict>
                <key>result</key>
                <dict>
                    <key>description_short</key>
                    <string>The must see attractions of the United Kingdom, World Heritage sites, Stonehenge and the Roman Baths.</string>
                    <key>flex_reference</key>
                    <string>FLX-LON-65D-AC0-B08E</string>
                    <key>geocoded_latitude</key>
                    <string>51.5081289</string>
                    <key>geocoded_longitude</key>
                    <string>-0.128005</string>
                    <key>name</key>
                    <string>Stonehenge and Bath</string>
                    <key>primary_image</key>
                    <string>http://media.****.com/FLX-LON-65D-AC0-B08E-image_original-2E.jpg</string>
                    <key>product_categories</key>
                    <array>
                        <dict>
                            <key>product_category</key>
                            <dict>
                                <key>kind</key>
                                <string>type</string>
                                <key>name</key>
                                <string>Sightseeing Tours</string>
                            </dict>
                        </dict>
                        <dict>
                            <key>product_category</key>
                            <dict>
                                <key>kind</key>
                                <string>category</string>
                                <key>name</key>
                                <string>Excursion</string>
                            </dict>
                        </dict>
                    </array>
                </dict>
            </dict>
        </array>
        <key>total_pages</key>
        <integer>18</integer>
        <key>total_results</key>
        <integer>54</integer>
    </dict>
</dict>
</plist>
  • 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-15T23:40:34+00:00Added an answer on June 15, 2026 at 11:40 pm
    NSDictionary *jsonResponse = /* get your dictionary from wherever */
    NSDictionary *searchResults = [jsonResponse objectForKey:@"search_result"];
    NSArray *allResults = [searchResults objectForKey:@"results"];
    
    for (NSDictionary *result in allResults)
    {
        NSDictionary *resultDetails = [result objectForKey:@"result"];
    
        NSString *name = [resultDetails objectForKey:@"name"];
        NSURL *imageURL = [NSURL URLWithString:[resultDetails objectForKey:@"primary_image"]];
    
        NSLog(@"Name: %@\n URL: %@", name, imageURL);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
I have a small JavaScript validation script that validates inputs based on Regex. I
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I know there's a lot of other questions out there that deal with this
I have been unable to fix a problem with Java Unicode and encoding. The
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am using jsonparser to parse data and images obtained from json response. When
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i

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.