OpenWGA 7.7 - TMLScript reference
CollectionResultMethod :
map(function)
On object | CollectionResult |
Usage |
map(function) takes a JS-Function as parameter. This function is called for each result entry with the TMLContext as parameter and must return some value. The return value of map() is a list of all mapped values. |
Description |
The given function is called for every document that is retrieved from the collection and receives it as a TMLContext parameter. |
Parameters |
function (Function): A JavaScript function |
Return value |
The CollectionResult for further chaining. |
Allowed in script types |
|
Examples |
_opts = WGA.nav().children().map(function(doc){
return doc.TITLE + "|" + doc.KEY }) |