Objects can't be sorted by any built-in function that I know of. If you just need to access them in order you can create a separate array containing just the keys and sort that.
JScript code:
var MyObj = {}; // Define empty object
MyObj["X"] = 'bbbb';
MyObj["Z"] = 'dddd';
MyObj["W"] = 'aaaa';
MyObj["Y"] = 'cccc';
// Put keys in array and sort
var keyArray = [];
for(key in MyObj) keyArray.push(key);
keyArray.sort();
// Loop through object using keyArray order
for(var i=0; i<keyArray.length; ++i)
Debug.Trace(MyObj[keyArray[i]]);
It really depends what you want to do with the values and why they need to be in a particular order.