StructDelete(payment,b)

-----Original Message-----
From: Kay Smoljak [mailto:[EMAIL PROTECTED]]
Sent: vrijdag 12 april 2002 11:14
To: CF-Talk
Subject: Deleting dynamic structure keys


In my continuing structure saga...

I need to delete a structure key, which is itself a stucture. Like this:

<cfloop collection="#payment#" item="b">
        <cfif payment[b].amount EQ "0">
                <cfset freebies[b] = StructCopy(payment[b])>
                <cfset success = StructDelete(payment,payment[b])>
        </cfif>
</cfloop>

That doesn't work, because the second parameter of StructDelete has to
be a simple value. Problem is, I don't know the key's name.
StructClear(payment[b]) clears the structure, but doesn't remove the key
itself.

Am I missing something?
Kay.
______________________________________________________ 
Kay Smoljak - ColdFusion Developer - PerthWeb Pty Ltd 
  
Level 9/105 St George's Terrace - Perth - Western Australia 
Ph: (08) 9226 1366 Fax: (08) 9226 1375 www.perthweb.com.au

http://developer.perthweb.com.au - Tools for Developers
cfx_pwcamtech | cfx_pwimageproc | cfx_pwcardcyrpt
                

 
 


______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to