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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:44:58+00:00 2026-06-07T16:44:58+00:00

I’m really stuck right now while using BZForursquare to get nearby Venues into a

  • 0

I’m really stuck right now while using BZForursquare to get nearby Venues into a UITableView.

BZFoursquare: https://github.com/baztokyo/foursquare-ios-api

I get my Requestresult inside the requestDidFinishLoading Delegate Method. In this Method the request Object contains several NSDictionaries and one Dictionary is in request.response. This response Dictionary contains one entry with key=”venues” and as Value a JSON Object. When I put this value Object into a dictionary the type seems not to be a Dictionary but a NSCFArray:

#pragma mark BZFoursquareRequestDelegate
- (void)requestDidFinishLoading:(BZFoursquareRequest *)request {
    self.meta = request.meta;
    self.notifications = request.notifications;
    self.response = [request.response objectForKey:@"venues"];
    self.request = nil;
    [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
    NSLog(@"%@",[self.response objectForKey:@"name"]);
}

I assume this because the NSLog Line gives me the following error:

-[__NSCFArray objectForKey:]: unrecognized selector sent to instance 0x1e5c90f0

Now I’m totaly confused and tried some failed attempts to get this JSON from whatever kind od Datatype it is into a NSDictionary. One attempt was to put the value Object into an NSString and use

[NSJSONSerialization JSONObjectWithData:[responseString dataUsingEncoding:NSUTF8StringEncoding] options:0 error:&error];

to get it into a Dictionary but that also failed because it still remains a NSCFArray. Can someone please tell me how I get content of

[request.response objectForKey:@"venues"]

into a NSDictionary so that I can populate my UITabelview with this content?

EDIT:

Here is whats in the value part from the Dictionary request.response:

(
    {
    categories =         (
                    {
            icon =                 {
                name = ".png";
                prefix = "https://foursquare.com/img/categories/food/default_";
                sizes =                     (
                    32,
                    44,
                    64,
                    88,
                    256
                );
            };
            id = 4bf58dd8d48988d10b941735;
            name = "Falafel Restaurant";
            pluralName = "Falafel Restaurants";
            primary = 1;
            shortName = Falafel;
        }
    );
    contact =         {
    };
    hereNow =         {
        count = 0;
        groups =             (
        );
    };
    id = 4df3489dfa76abc3d86c4585;
    likes =         {
        count = 0;
        groups =             (
        );
    };
    location =         {
        cc = DE;
        city = "Vinn";
        country = Germany;
        distance = 92;
        lat = "51.44985";
        lng = "16.648693";
        state = "Nordrhein-Westfalen";
    };
    name = "Yildiz D\U00f6ner";
    specials =         (
    );
    stats =         {
        checkinsCount = 3;
        tipCount = 0;
        usersCount = 2;
    };
    verified = 0;
}

And this seems to be from Type of NSCFArray. And how can I create from this another Dictionary so that I can access the JSON Values by key? Sorry if I’m really slow today…

  • 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-07T16:45:00+00:00Added an answer on June 7, 2026 at 4:45 pm

    You ask for “venues” which I assume is an array of such. So after deserializing the json, log the return object to see what you get. It’s almost for sure an array of dictionaries.

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

Sidebar

Related Questions

this is what i have right now Drawing an RSS feed into the php,
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a jquery bug and I've been looking for hours now, I can't
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build

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.