How to get JavaScript hash table count? [duplicate]

Object.keys will return all the keys in the object as a list, then use length to get the length.

example:

Object.keys(hash_table).length

NOTE that this is ECMA 5 and may not be available in some browsers. see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/keys for full document.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)