Answered
array notation strangeness
In the cfoutput they all give the same result: 1.
I understand why using dot notation for the first example mystruct.key1 will give me the key1 of the mystruct structure and why using array notation mystruct["key1"] will give me the result 1 as key1 in the mystruct structure is 1 but I don´t understand why the #mystruct[key1var]# gives me 1 as well. As far as I can gather it should give me the result key1 as a string as key1var is a variable with the string value key1. It must be because it copies the key1 value from the structure but I have no idea why. Why is this please? Thank you
I understand why using dot notation for the first example mystruct.key1 will give me the key1 of the mystruct structure and why using array notation mystruct["key1"] will give me the result 1 as key1 in the mystruct structure is 1 but I don´t understand why the #mystruct[key1var]# gives me 1 as well. As far as I can gather it should give me the result key1 as a string as key1var is a variable with the string value key1. It must be because it copies the key1 value from the structure but I have no idea why. Why is this please? Thank you
