I have a JavaScript object. Is there a built-in or accepted best practice way to get the length of this object?
const myObject = new Object(); myObject["
If we have the hash
hash = {"a" : "b", "c": "d"};
we can get the length using the length of the keys which is the length of the hash:
keys(hash).length