Name

StructUpdate

Synopsis

                  
                  
                  StructUpdate(structure, key, value)

Updates the specified key in structure by overwriting the existing data with value. The following example uses this function to update a key/value in a structure:

<cfset Employee=StructNew( )>
<cfset Employee.Name="Pere">
<cfset Employee.Title="President">
<cfset Employee.Department="Executive Management">
<cfset Employee.Email="pmoney@example.com">
<cfset Employee.PhoneExt="1234">
   
<cfset StructUpdate(Employee, "Name", "Pere Money")>
   
<cfdump var="#Employee#">

Get Programming ColdFusion MX, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.