[Proto-Scripty] Re: Object from string

2011-07-10 Thread T.J. Crowder
On Jul 9, 6:15 pm, kstubs wrote: > Wow, you just have to love Javascript, so flexible sometimes!  What an > amazing language, I tell ya. > Thanks for that shortcut ilandril! You can even use an expression within the square brackets: var idx = itt + 1; var h = {}; h['p_Value' + idx.toString()] =

Re: [Proto-Scripty] Re: Object from string

2011-07-09 Thread kstubs
Wow, you just have to love Javascript, so flexible sometimes! What an amazing language, I tell ya. Thanks for that shortcut ilandril! -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To view this discussion on the web visit http

Re: [Proto-Scripty] Re: Object from string

2011-07-09 Thread Joseph Spandrusyszyn
var idx = itt + 1; var name = 'p_Value' + idx.toString(); var h = {}; h[name] = names[itt]; On Jul 9, 2011 4:24 AM, "kstubs" wrote: > OK, I figured it out. Here is my solution, and ultimately I need an Object, > as you can see I'm extending args in the end, so is there a way to avoid >

[Proto-Scripty] Re: Object from string

2011-07-09 Thread kstubs
OK, I figured it out. Here is my solution, and ultimately I need an Object, as you can see I'm extending args in the end, so is there a way to avoid creating the hash, then casting the hash to an object? var idx = itt + 1; var name = 'p_Value' + idx.toString();