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

  • Home
  • SEARCH
  • 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 6702491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:03:37+00:00 2026-05-26T07:03:37+00:00

I have an array containing objects. I fill a dropdown using the array. How

  • 0

I have an array containing objects. I fill a dropdown using the array. How can the elements in the dropdown be arranged based a property of the object say ID?

The array has 3 elements (read objects at indexes 0,1, and 2). I want to rearrange my dropdown based on a property of the object in the array, say ID (which is 3,1 and 2 respectively).

Currently even if I bind the dropdown with sorted array, it is a futile effort, as the dropdown is indexed based on the name of the property.

_data.push(objItem[i]); 
// here the array is being populated with data after it has been populated, I'm filling a dropdown using
 System.Utils.fillSelectData("$selectDDL", _data, "FieldValue", "FieldText");
//our framework supports this code But every time the binding is being done based on FieldText..

Any insight would be highly obliged..

  • 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-26T07:03:38+00:00Added an answer on May 26, 2026 at 7:03 am

    ordering objects by id example:

        var employees=[]
            employees[0]={id: 1, name:"George", age:32}
            employees[1]={id: 4, name:"Edward", age:17}
            employees[2]={id: 2, name:"Christine", age:58}
            employees[3]={id: 3, name:"Sarah", age:62}
    
        var sorted = employees.sort(function(a, b) {
           return a.id-b.id 
        });
    
        for(var i=0;i<sorted.length;i++) {
           alert(sorted[i].id); 
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple JavaScript Array object containing a few numbers. [267, 306, 108]
I have both matrices containing only ones and each array has 500 rows and
I have an array in php with Objects containing an id and a parent_id
I have an array of objects containing pairs of string labels and values, how
I have a 2D array containing all the Piece objects, each an instance of
I have an array of Password objects, each containing a tag , a username
I have an array list comprised of Objects. Each object is comprised of Strings.
I have an NSArray containing numbers as NSString objects. ie. [array addObject:[NSString stringWithFormat:@%d, 100]];
i have an arraylist of objects, each containing a year/month/day/hour property. what i'm ultimately
I have a array containing japanese caracters as well as normal. How do I

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.