all
Maps each list element to an expression.
Description
The map
function applies an expression to each element within a list,
returning a list of the same length.
list : list
A list of values.
capture : field
The name of each list element in the mapping expression.
expression : any
The expression applied to each list element.
Examples
Stringify all elements of list
Reshape a record inside a list
from {
answers: [{rdata: 76.76.21.21, rrname: "tenzir.com"}]
}
answers = answers.map(x, {hostname: x.rrname, ip: x.rdata})