Using ColdFusion Structures To Remove Duplicate List Values

<!--- Create a structure to hold the movie titles. --->
<cfset objMovies = StructNew() />
 
<!--- Loop over the list to add mappings to the struct. --->
<cfloop index="strMovie" list="#lstMovies#" delimiters=",">
 
	<!---
		Store key/value pair. In this case, we don't
		really care about the value (hence storing ""
		as value). We only care about the key.
	--->
	<cfset objMovies[ strMovie ] = "" />
 
</cfloop>
 
<!--- Convert the now unique key values into a list. --->
<cfset lstMovies = StructKeyList( objMovies ) />

For Cut-and-Paste