Hi Arian. WOW you got it reduced by...a ton of lines :P very nice :)
It seems still working the same :) By the way, I don't return the modified object since the function modifies it itself. I mean, the object passed is modified by the function itself. That might be changed now that I think it... LOL On 2 ene, 17:36, Arian Stolwijk <[email protected]> wrote: > I updated it a little: http://jsfiddle.net/uqcDR/3/ > <http://jsfiddle.net/uqcDR/2/> > > Hope it still works fine, but that's why Tests/Specs were invented :) > > > > > > > > On Sun, Jan 2, 2011 at 11:12 PM, Ciul <[email protected]> wrote: > > Hi pals. > > > I've seen myself in many circunstances needing something to append or > > set values to an object in a given path got from a dynamic string. > > I mean, each time receive a different string from some function and > > then need to populate an object with values at the path given by that > > string. > > > I wrote a function that could be added to MooTools->More->ObjectExtras > > if MooTools developers think it worths it. > > > In fact I got kinda inspired from MooTools->More->ObjectExtras- > > >getFromPath to write it. Thanks for that :P > > > jsFiddle link: > >http://jsfiddle.net/Ciul/uqcDR/ > > > Note: Look at the javascript console, it will throw some warnings but > > you can see the results anyway. > > > Judge it by yourself and I'd appreaciate any feedback. > > > Best regards, > > Ciul.
