Hi, I know that you can access a key in a CF structure dynamically, using bracket notation, as in:
<cfset structName[keyname] = 0 /> .... so that the "keyname" could be a variable, allowing you to access the value with the keyname stored in the variable. But I need to go one level deeper. I have a struct of structs, where I need to access a key in the second-level struct dynamically. Let's say I have: myStruct = structNew() myStruct.subStruct1 = structNew() myStruct.subStruct1.key1 = foo myStruct.subStruct1.key2 = bar myStruct.subStruct2.key1 = something myStruct.subStruct2.key2 = nothing I know that I can do: myVariable = "subStruct1" and then reference: myStruct[myVariable].key1 .... and get the value "foo" But what if the keyname in the lower struct needs to be determined dynamically? That is, what if I don't know that I want "key1," but rather a key referenced by a variable. Out of curiosity, I tried nesting the brackets, to see if you could access the inner struct that way: myStruct[myVariable[myVariable]] .... but that just caused the familiar "dereferencing a scalar" message. Does anyone know how to do this? Do I have to fall back on "Evaluate"? Any help is greatly appreciated. -- Thanks, Tom Tom McNeer MediumCool http://www.mediumcool.com 530 Means St NW, Suite 110 Atlanta, GA 30318 404.589.0560 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244929 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

