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..
ordering objects by id example: