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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T15:11:30+00:00 2026-06-10T15:11:30+00:00

in my app i am getting some queue details value from web server, i

  • 0

in my app i am getting some queue details value from web server, i have stored the queue id and queue title in NSMutableArray, now i need to sort queue title in alphabetical order, however if i am doing this all my queue id values got mixed up, so how do make this that queue title should be sorted in alphabetical order and stored there respective queue id values.

NSArray *DicPicklistValues = [tempPickList valueForKey:@"PickListValue"];
for(int i=0;i<[DicPicklistValues count];i++){

    NSDictionary *tempDic = [DicPicklistValues objectAtIndex:i];
    [queueId addObject:[tempDic objectForKey:@"Value"]];
    [queueLabel addObject:[tempDic objectForKey:@"Label"]];
}

[queueLabel sortUsingSelector:@selector(localizedCaseInsensitiveCompare:)];
  • 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-10T15:11:32+00:00Added an answer on June 10, 2026 at 3:11 pm

    You could sort the DicPicklistValues array before building the queueId and queueLabel arrays. (Btw. names of variables normally start with a lower case letter.)

    NSArray *dicPicklistValues = [tempPickList valueForKey:@"PickListValue"];
    NSSortDescriptor *sort = [NSSortDescriptor sortDescriptorWithKey:@"Label"
                            ascending:YES
                            selector:@selector(localizedCaseInsensitiveCompare:)];
    NSArray *sortedPicklistValues = [dicPicklistValues sortedArrayUsingDescriptors:[NSArray arrayWithObject:sort]];
    // now use sortedPicklistValues instead of dicPicklistValues ...
    

    There is also an easier way to build the queueId and queueLabel arrays:

    NSArray *queueId = [sortedPicklistValues valueForKey:@"Value"];
    NSArray *queueLabel = [sortedPicklistValues valueForKey:@"Label"];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an app which downloads some files from the server in few threads.
I have question. I have some app on facebook and getting this error Fatal
When I create a Rails app I am getting some errors and I have
I have have running windows service that is using it's app.config for getting some
I have been getting some massive head aches working on a very dynamic app.
in my app when i click a button i am getting some data from
My iphone app getting json data from php server. 2 basic questions, just to
I'm building a Python ISO generation app, and I'm getting some wierd output from
I published an app 2 moths ago and sometimes, I am getting some errors
I'm having some trouble getting my C# Facebook canvas app to determine if 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.