How to filter a query in cfscript?
Syntax:
users = queryNew( "id,userType,name", "integer,varchar,varchar" );
queryAddRow(users, [{
id: 1,
userType: "user",
name: "John"
},{
id: 2,
userType: "admin",
name: "Sam"
},{
id: 3,
userType: "user",
name: "Tom"
}]);
adminUsers = users.filter( function( user ){
return user.userType == "admin";
} );