map
Map array items with a small arrow-function expression.
Syntax
{{ value | map:item => item.name }}{{ value | map:item => ({name: item.name}) }}Example
Basic usage
1{2 "people": [3 {4 "name": "Ada"5 },6 {7 "name": "Lin"8 }9 ]10}1{{ people | map:person => person.name }}1["Ada","Lin"]Behavior
- The expression can select nested properties or construct a small object.