JS equivalent of RGSSx Hash.keys

In Ace, I have something that goes like this:


@objects = {}
@objects[1] = ...
@objects[2] = ...
@objects[3] = ...

return @objects.keys


which would give me [1, 2, 3]


In JS, I've tried to duplicate this as:


this._objects = {};

this._objects[1] = ...;
this._objects[2] = ...;
this._objects[3] = ...;


What is the equivalent command that will result in an array with the values [1, 2, 3]?


Note, the hash/object keys aren't necessarily going to be numbers, or sequential.  I've just used those for simplicity.
You can use this.


https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys

Code:
var obj1 = {};
obj1[0] = 0;
obj1[1] = 0;
obj1[2] = 0;
// ['0', '1', '2']
Object.keys(obj1); 

var obj2 = [];
obj2['A'] = 0;
obj2['B'] = 0;
obj2['C'] = 0;

// ["A", "B", "C"]
Object.keys(obj2);
Thank you - that's just what I want.  I'll give it a go.

Original thread: https://forums.rpgmakerweb.com/threads/js-equivalent-of-rgssx-hash-keys.72057/