javascript store of db values

I have seen this done but not sure how to go about it. Go to the DB
and get values and store them in a javascript hash for much quicker
lookup.
I have a drop down with a few items and I display the "long" name
version next to the drop down would much rather get the values out of
a JS hash than going to the server every time. Is there a way to dot
that or someway similar for not a lot of data to reference for quicker
lookup and also not having to go to the server every time for it? The
data is has a 'name' and also a 'long_name' in the db.