[Proto-Scripty] enumerate hash

2010-04-08 Thread chrysanthe m
Hello I am having a difficult time trying to enumerate a hash to determine if a give key is in the hash and if so delete it and its value. If I could approach it index it would be function remove(valueToTest, hashToBeTested){ -- You received this message because you are subscribed to the Google

Re: [Proto-Scripty] enumerate hash

2010-04-08 Thread Alex Wallace
Your message was truncated, but the method you are looking for is `unset`. http://api.prototypejs.org/language/hash/prototype/unset/ Since the function is using `delete this._object[key]` nothing will occur if you feed it a value that actually does not exist in the hash object. Best, Alex On