Thank you.
Both of you solutions worked to me!.
I thought there will be a javascript api something like obj1.concat(obj2);.
Regards.
Kanugula.
Fink, Andreas wrote:
>
> Hi,
>
> Here's a example to run in qooxdoo Playground:
>
> var obj1 = {"a":"1","b":"2"};
> var obj2 = {"c":"3","d":"4"};
>
> this.debug(obj2);
>
> for (attribute in obj1) {
> obj2[attribute] = obj1[attribute];
> }
>
> this.debug(obj2);
>
> I'm not sure if this fits all your needs. Maybe you have to check if one
> attribute already exists or something else.
>
> Greetings,
> Andreas
>
> -----Ursprüngliche Nachricht-----
> Von: Kanugula [mailto:[email protected]]
> Gesendet: Dienstag, 2. Juni 2009 00:23
> An: [email protected]
> Betreff: [qooxdoo-devel] merging objects
>
>
> Hi there,
>
> I want to merge two javascript objects.
> var obj1 = {"a":"1", "b":2"}
> var obj2 = an object of some type which can be converted (let's assume it)
> to something like {"c":"3", "d":"4"}
>
> Do you know how to concatenate obj1 and obj2?
> I do not what is there in obj1 and obj2 at runtime? I use Qx 0.7.2. Has
> nothing to do thi anyway.
>
> Thank you.
> Kanugula.
> --
> View this message in context:
> http://www.nabble.com/merging-objects-tp23823437p23823437.html
> Sent from the qooxdoo-devel mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
--
View this message in context:
http://www.nabble.com/merging-objects-tp23823437p23838533.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel