I normally use a modified getFromPath that has an option to build the path
if it doesn't exist and returns the final object. You can build this
setFromPath really simply on top of this.
http://jsfiddle.net/uqcDR/6/

On Sat, Jan 8, 2011 at 5:54 AM, Ciul <[email protected]> wrote:

> Hi Arian.
>
> I corrected a little error while writing you made,
>
> if (i < (l - 1) && (!source.hasOwnProperty(parts[i]) || !
> Type.isObject(source[i]))){
> to
> if (i < (l - 1) && (!source.hasOwnProperty(parts[i]) || !
> Type.isObject(source[parts[i]]))){
>
> you missed the parts[i] while asking for the type of source[ ]
> and that's it
>
> jsFiddle:
> http://jsfiddle.net/Ciul/uqcDR/4/
>
> Best regards,
> Ciul

Reply via email to