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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T10:16:51+00:00 2026-05-30T10:16:51+00:00

I am trying to parse the JSON at this URL: http://maps.googleapis.com/maps/api/geocode/json?address=canada&sensor=false in Objective-C. I’m

  • 0

I am trying to parse the JSON at this URL:

http://maps.googleapis.com/maps/api/geocode/json?address=canada&sensor=false

in Objective-C. I’m trying to get the northeast latitude under “bounds”, and this is the code I’ve written to try and do that (feed is an NSDictionary object):

NSArray *results = [feed objectForKey:@"results"];
NSDictionary *firstResult = [results objectAtIndex:0];
NSArray *geometry = [firstResult objectForKey:@"geometry"];
NSDictionary *firstGeo = [geometry objectAtIndex:0];
NSArray *bounds = [firstGeo objectForKey:@"bounds"];
NSDictionary *northeast = [bounds objectAtIndex:0];
NSString *neLat = [[NSString alloc] initWithString:[northeast objectForKey:@"lat"]];

Even though it compiles fine and the JSON data is valid, when I run it I get this error:

[__NSCFDictionary objectAtIndex:]: unrecognized selector sent to instance 0xa672390
2012-02-24 01:32:06.321 Geo[570:11603] * Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[__NSCFDictionary objectAtIndex:]: unrecognized selector sent to instance 0xa672390’

I don’t know why this is happening, as I successfully got long_name before… any help is greatly appreciated 🙂

Thanks in advance!

  • 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-30T10:16:52+00:00Added an answer on May 30, 2026 at 10:16 am

    The geometry and bounds are already dictionaries.

         "geometry" : {    // <-- a dictionary!
            "bounds" : {   // <-- also a dictionary!
               "northeast" : {
                  "lat" : 83.1150610,
                  "lng" : -52.62040200000001
               },
    

    So you should write

    NSDictionary *geometry = [firstResult objectForKey:@"geometry"];
    NSDictionary *bounds = [geometry objectForKey:@"bounds"];
    NSDictionary *northeast = [bounds objectForKey:@"northeast"];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to parse the city from this JSON file http://api.crunchbase.com/v/1/company/airbnb.js This is how
I am trying to parse JSON in an Adobe Flex app, using http://www.mikechambers.com/blog/2006/03/28/tutorial-using-json-with-flex-2-and-actionscript-3/'>This Tutorial
I am trying to parse this json data from the url but i get
I'm trying to access a site via their JSON export. The URL is: http://neotest.dabbledb.com/publish/neotest/f820728c-4451-41f6-b346-8cba54e52c6f/projects.jsonp
I am trying to parse Json response from This URL . I have used
I am trying to download some JSON from the google book API. The URL
I'm trying to parse the total funding dollar amount out of this JSON file:
I'm trying to parse json request using google GSON (on Android although this is
I'm trying to parse some JSON data from the Google AJAX Search API. I
I'm trying to parse a JSON string like this one [ { updated_at:2012-03-02 21:06:01,

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.