hash maps take O(1) to get elements in it (for the most part). This is because elements in the hash map are stored in a more mathematical way by hashing. I recommend reading up on it, it uses cool computer science concepts and when used correctly is a lot efficient.
Here is one reference: https://medium.com/@dineshmatrix2/why-hashmap-lookup-is-constant-time-o-1-7fa6b7a4cae2