On Aug 15, 2007, at 2:05 PM, jarrod wrote:
> So far the best I've come up with is a collect iterator on the array
> that builds a JSON string of each item. I then pass the
> string.evalJSON() to the $H() operator.
>
> Any better suggestions?
If that's really the way you want to go, why bother with the string-
>hash conversion?
var h = {};
arr.each(function (a) {
h[a.id] = a;
});
console.log( $H(h).inspect() );
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---