It was my impression that she wanted stFirst to contain everything from
stSecond UNLESS a corresponding key already existed in stFirst. Your code
would overwrite existing values in stFirst. I would suggest StructInsert. It
has an optional third arg to block the creation of a key that already
exists.

-ray

>
> <cfscript>
>       stFirst = structNew();
>       stSecond = structNew();
>
>       stFirst.A = "a";
>       stFirst.B = "b";
>       stFirst.C = "c";
>       stFirst.D = "d";
>       stFirst.E = "e";
>
>       stSecond.A = "aa";
>       stSecond.B = "bb";
>       stSecond.C = "cc";
> </cfscript>
>
> Dump of stFirst:
> <cfa_dump var="#stFirst#">
>
> Dump of stSecond:
> <cfa_dump var="#stSecond#">
>
> <cfloop collection="#stSecond#" item="key">
>       <cfset stFirst[key] = stSecond[key]>
> </cfloop>
>
> Dump of new stFirst:
> <cfa_dump var="#stFirst#">
>
>
> Hope this helps!
>
> Jason
>
>

------------------------------------------------------------------------------
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to