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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:25:01+00:00 2026-06-17T12:25:01+00:00

I begin in Ios dev and I got some troubles to manipulate an array

  • 0

I begin in Ios dev and I got some troubles to manipulate an array create by Json :
I call in my app a web Service which return me data :

{evenements =(
             ({
            dateEvenement ={
                1 = "01-01-2013";
                2 = "02-01-2013";
                3 = "03-01-2013";
                4 = "04-01-2013";
            };
            idEvenement = 61;
            nbrInvite = 1;
            nomEvenement = "My event Name";
            nomUtilisateur = "Lucas ";
        }
    ),
 );
}

I’m able to get all the values by the following code except for “dateEvenement” :

NSArray *msgList;
msgList = [ jsonResults objectForKey:@"evenements" ];

for (NSDictionary *evenements in msgList) {

    for (NSDictionary *evenement in evenements ) {

        NSString *idEvenement = [evenement objectForKey:@"idEvenement"];
        NSString *nomUtilisateur = [evenement objectForKey:@"nomUtilisateur"];
        NSString *nomEvenement = [evenement objectForKey:@"nomEvenement"];
        NSString *nbrInvite = [evenement objectForKey:@"nbrInvite"];

        NSArray *dates = [ evenement objectForKey:@"dateEvenement" ];
     }
}

Can you help me for getting datas of “dateEvenement”

  • 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-17T12:25:02+00:00Added an answer on June 17, 2026 at 12:25 pm

    Well in your JSON the dateEvenement isn’t an Array but a dictionary:

    NSDictionary *dates = [ evenement objectForKey:@"dateEvenement"];
    
    for(NSNumber *key in dates) {
       NSString *dateString = [dates objectForKey:key];
       NSLog(%@ : %@, key, dateString); 
    }
    

    As declared in your JSON example the key’s for the dictionary are numbers, thus you should NSNumber object for the key type.

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

Sidebar

Related Questions

I have an app for iOS that display some files in a tableview which
Trying to ease my animation in some iOS app I'm working on. Experienced a
I've got some code that wobbles UIViews, much like when you edit your iOS
In my ios app, I begin by loading the SecondViewController using the code shown
To begin, I am writing an iOS 5 app. By way of example, say
I have an iOS 5 app that uses NSURLConnection to load some XML via
I've written my first iOS app, Amaziograph, which uses Core Graphics. My app is
Our team is currently working on some killer ios location app that we fear
I begin in GUI with Tkinter with Python. I'm trying to create a graphical
I have an iOS app that displays content from a sqlite db in a

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.