I have trouble figuring out why you would need such a fonctionnality since
hash indexing is based on key value mapping.
It looks like a value reassign to me.

However, if you have the "oldKey" you can get away with that one line
reassign:

hash.update({newKey : hash.get(oldKey)}).unset(oldKey);


Just a snippet in case you dont want to type that line every time:

Hash.prototype.reassign = function(oldKey, newKey){
    this.set(newKey, this.get(oldKey));
    this.unset(oldKey);
};

Simon
2009/4/23 Benjamin <benjaminru...@googlemail.com>

>
> Hey guys,
>
> i miss the functionality of changing the key of a hashvalue. Makes
> such a functionality sense, for example in the next prototype version?
>
> greets
> benjamin
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to 
prototype-core-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to