This is a kind of strange question but is there a way to set a key to be the "first" key in an object?
For example say I have an object:
object = {
'name': bob,
'3': 3,
'id': 1
}
And if I call Object.getOwnPropertyNames(object)
, is there a way I can fix the order to be something like ['id', '3', 'name']
?