I'm using Coldfusion. I want to concatenate two strings into the same struct key, but I keep getting an error of "can't convert x into a boolean."
For example:
<cfset myStruct.string1 = nodes[1].string1.XmlText>
<cfset mystruct.string2 = nodes[1].string2.XmlText>
Neither of the following works
<cfset myStruct.concatendatedSring = nodes[1].string1.XmlText AND nodes[1].string2.XmlText>
<cfset myStruct.concatendatedSring = myStruct.string1 AND myStruct.string2>
Why does neither method work?
&
is the string concat operator, AND
and &&
are boolean operators.
<cfset myStruct.concatendatedSring = myStruct.string1 & myStruct.string2>