I was wondering if when we access an object key:
obj.key
obj["key"]
The JS optimizes this with O(1), using hash, enum or something else? Or is a sequencial search until it find the key that you want?
If the second question is true, make no sense creating a object that its keys store an other object. Instead, is better creating a array of objects and acess the values with arr[i].
I'm building a small web app and my db is just a JSON with maany keys, and each key has an object. Is it better to have an array of objects instead? Or this doesn't matter? (I'll not use the key name in this app)