Skip to content

Instantly share code, notes, and snippets.

@bharat20185
Created December 23, 2019 13:15
Show Gist options
  • Save bharat20185/cc9373811af49ac85d29a8cd928c8f12 to your computer and use it in GitHub Desktop.
Save bharat20185/cc9373811af49ac85d29a8cd928c8f12 to your computer and use it in GitHub Desktop.
<cfscript>
variables.heroQuery = queryNew(
'name,movies',
'varchar,varchar',
[
{
'name': 'Iron Man',
'movies': 'Iron Man,Iron Man 2,Iron Man 3'
},
{
'name': 'Captain America',
'movies': 'Captain America: The First Avenger,The Avengers'
}
]
);
variables.heroQuery.each(function(row, index, query){
writeOutput(row.name & ' played role in ' & row.movies.listLen() & ' movies');
writeOutput('<br />');
});
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment