[Proto-Scripty] Re: how merge two json objects?
To note, the jQuery#extend implementation is a bit more in depth... has there been any talk in the proto-core list about strengthening Object#extend? Rick On Mon, Sep 14, 2009 at 8:35 PM, Miguel Beltran R. yourpa...@gmail.comwrote: Thanks to both #Mangus and #Alexander Use Object.extend look so easy, what I not believe myself haha 2009/9/12 Alexander Wallace alexmlwall...@gmail.com var object1 = { foo : bar }; var object 2 = { baz : moof }; Object.extend(object1, object2); Object.extend returns the new object1, which now has the attributes { foo : bar, baz : moof }. Be aware that any duplicate value will be overridden by the newer value. On Fri, Sep 11, 2009 at 8:30 PM, Miguel Beltran R. yourpa...@gmail.comwrote: 2009/9/11 DJ Mangus d.man...@gmail.com I've never done this but I'm pretty sure you can use object.extend. http://api.prototypejs.org/language/object.html#extend-class_method but how used? -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: how merge two json objects?
Thanks to both #Mangus and #Alexander Use Object.extend look so easy, what I not believe myself haha 2009/9/12 Alexander Wallace alexmlwall...@gmail.com var object1 = { foo : bar }; var object 2 = { baz : moof }; Object.extend(object1, object2); Object.extend returns the new object1, which now has the attributes { foo : bar, baz : moof }. Be aware that any duplicate value will be overridden by the newer value. On Fri, Sep 11, 2009 at 8:30 PM, Miguel Beltran R. yourpa...@gmail.comwrote: 2009/9/11 DJ Mangus d.man...@gmail.com I've never done this but I'm pretty sure you can use object.extend. http://api.prototypejs.org/language/object.html#extend-class_method but how used? -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: how merge two json objects?
2009/9/11 DJ Mangus d.man...@gmail.com I've never done this but I'm pretty sure you can use object.extend. http://api.prototypejs.org/language/object.html#extend-class_method but how used? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: how merge two json objects?
It's explained in the link I gave. On Fri, Sep 11, 2009 at 5:30 PM, Miguel Beltran R. yourpa...@gmail.comwrote: 2009/9/11 DJ Mangus d.man...@gmail.com I've never done this but I'm pretty sure you can use object.extend. http://api.prototypejs.org/language/object.html#extend-class_method but how used? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---