Subj : Re: Serializing JavaScript in spidermonkey To : netscape.public.mozilla.jseng From : Martin Honnen Date : Thu Jan 01 2004 12:57 pm Marcello Bastea-Forte wrote: > I wrote some code to test toSource and uneval: > > var state = new Array(); > state['beat_boss'] = true; > state['name'] = "j0"; > state['number'] = 3; > state['array'] = new Array(); > state['array']['beat_boss'] = true; > state['array']['name'] = "j0"; > state['array']['number'] = 3; > > print(uneval(state)); > print(state.toSource()); > > > The output I get is: > [] > [] Is there any reason you need new Array()? I think if you do var state = new Object(); and state['array'] = new Object(); the uneval works just fine. -- Martin Honnen http://JavaScript.FAQTs.com/ .