Displaying 1 result from an estimated 1 matches for "foodsbylett".
Did you mean:
foodsbyletter
2007 Jul 02
2
Object Property Sorting - Hash?
...t guarantee the order of the properties.
Is there an easy and low-overhead way to guarantee order? Or would I
need to have some type of collection object that uses arrays instead of
the property-value configuration that Hash uses?
Here is an example object similar to the one I want to sort:
var foodsByLetter = {
''B'': [''broccoli'', ''bread''],
''C'': [''carrots'', ''celery''],
''A'': [''alfalfa sprouts'', ''apple'']
};
Then I want to sort by the obje...