[javascript] best way to get the key of a key/value javascript object