Whatever message this page gives is out now! Go check it out!
ListMap(list, callback [,delimiter, includeEmptyFields])Parameter | Req/Opt | Default | Description |
list | Required | The input list. | |
callback | Required | Closure or a function reference that will be called for each iteration. The arguments passed to the callback are
| |
delimiter | Optional | comma (,) | The list delimiter. The type is string . |
includeEmptyFields | Optional | false | Include empty values. The type is boolean. |
<cfscript>
myList="Tokyo,Bangkok,Jakarta,Manila,Bangalore,Shanghai";
closure=function(item){
return reverse(item); // Reverses each list item
}
myMap=ListMap(myList,closure);
WriteOutput(myMap);
</cfscript>