Javascript datastructure / in memory database for storing keys against locations