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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:31:13+00:00 2026-05-24T05:31:13+00:00

I have an iPhone application which gets a json string from a server and

  • 0

I have an iPhone application which gets a json string from a server and parses it. It contains some data e.g. school timetable information. The data is stored in an nsdictionary and then passed into a nsmuttablearray. e.g.

Could someone please point me in the right direction/tell me how i can access the different ‘roots’ of the array? I want to store the elements that have the field ‘Day’ as “Monday” (or maybe u can tell me how i can sort/do a search though them). Been spending quite some time trying to find some information on this (how to access/alter nested values) but no luck =/. thanks..

  • 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-24T05:31:13+00:00Added an answer on May 24, 2026 at 5:31 am

    Your best bet for accessing all of the Dictionary objects with Day = Monday would be to use a Predicate with a Key Path to what you’re after…

    NSPredicate* predicate = [NSPredicate predicateWithFormat:@"Day == 'Monday'"];
    NSArray* mondayCourses = [rows filteredArrayUsingPredicate:predicate];
    

    You can make the predicate dynamic too.

    NSPredicate* predicate = [NSPredicate predicateWithFormat:@"Day == %@", dayOfTheWeek];
    

    where dayOfTheWeek might be an NSString that holds the current day of the week in a loop etc.

    If you want to sort the array, you can do so using Sort Descriptors.

    NSSortDescriptor* idSortDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"id" 
                                                                       ascending:YES];
    NSSortDescriptor* levelSortDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"Level" 
                                                                          ascending:YES];
    NSArray* sortedMondayRows = [mondayRows sortedArrayUsingDescriptors:[NSArray arrayWithObjects:idSortDescriptor, levelSortDescriptor, nil]];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently writing an iPhone application which gets some data from the user and
I have created an iPhone application which fetches data held on a server in
I have to export a movie from my iPhone application which contains UIImage from
I have an iPhone application which has some methods to gather information from the
I have iphone application in which I am downloading images from server & displaying
I have an iPhone application which basically is getting information from an API (in
I have an existing iPhone application which starts from a UIViewController. What I want
I have some query. First of all let's have an iPhone application flow which
I have a data Store that gets it's information from a JSON api on
I have an iphone application which has about 4 tabs. How do I force

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.