Given the object:
var opts = {
'all': 'All',
0: 'Some option',
1: 'Cookies',
};
Object.keys(opts)
returns this:
["0", "1", "all"]
When I'm expecting this:
["all", "0", "1"] // The order in which the keys are 'declared' in the obj
How can I iterate through the properties in the order in which they appear in the object?
Thanks.