Hi everybody I'm a prototype js developer and I'm moving for work/client reasons to jquery.
I'm a big fan of Prototype Hash var h = new Hash(); class I know that in jQuery is not any hash table available at least in the core, I would like to know what it the best alternative to have a good practice/solution in a way to manage my data structure in a pretty same way as I do it with the hash table? of course using Jquery.
-
What kind of things are you storing in the hashtable?Ry-– Ry- ♦2012-01-04 04:08:59 +00:00Commented Jan 4, 2012 at 4:08
-
normally I'm storing objects in the way { name : "myname", photos : ["1.jpg","2,jpg"], and : "so on"} basically what I do is ask for specify id in my hash table and retrieve the specific object of that id. for example if I have a list of user in a webpage and an user with id = 3 is clicked. I asked for h.get(3) => { name : "", bla bla}.ncubica– ncubica2012-01-04 04:24:28 +00:00Commented Jan 4, 2012 at 4:24
-
2You can use an object for that, too: jsfiddle.net/minitech/NJpSBRy-– Ry- ♦2012-01-04 04:28:19 +00:00Commented Jan 4, 2012 at 4:28
Add a comment
|