I understand that this is a little unorthodox.
Suppose I have this hash.
someHash = { 'item1' => '5', 'item2' => '7', 'item3' => '45', 'item4' => '09' }
Using native js, or a prototype or jQuery - is there a method that will allow me to get the "key name" just having a value?
I do not need all the keys, only those that match my value. Varieties look like a map in the opposite direction?
I get a return from db that gets a βvalueβ, and I need to match this value with some js hash on the front end.
So, the application passes me β45β ... Is there a way to use js (prototype or jquery) to get the key βitem3β?
source share