Thanks the decode worked perfectly!
options = JSON.decode(a.getProperty("opts"));
On Oct 21, 2:56 pm, "Martin Tillmann" <[EMAIL PROTECTED]> wrote:
> jan beat me to it but i think maybe your problem is rather to make an object
> from the string. Here's my take:
>
> $H(JSON.decode("{'name':'value','name2':'value2'}")).each(function(item,index){
> console.log("key= %s, value= %s",index,item);
>
> });
>
> You can use JSON.decode() to make the object from your string (assuming your
> string is valid JSON) and since this only gives you a plain object i make it
> a Hash and use each() on it. (you'll need firebug to make the above run!)
>
> On Tue, Oct 21, 2008 at 8:34 PM, TomWA007 <[EMAIL PROTECTED]> wrote:
>
> > Is there any way to convert the string "{name:value,name2:value2}" to
> > the iterable it looks like so that I can use $each to loop through it?