Docs
OverviewTemplate SyntaxQuick Guide

Resources

Source code

Modifiers

Text
Casing
lowerslugtitletitle_modelupper
Edit
concatreplacereplace_patternreverseshortenwrap
Split & join
joinlinessplit
Trim
trimtrim_prefixtrim_suffix
Escape
escape_htmlescape_jsescape_url
Format
currencydecimalformatlengthline_numbers
Collections
Access
findfirstkeylastpluck
Query
filterhasis
Transform
flattenmapmergesortsum
Files & paths
File
file
Path
dirnameextext_dotext_prependext_trimfilename
Convert
Parse
from_csvfrom_jsonfrom_yaml
Serialize
jsonmarkdownyaml
Logic
Compare
eqgtgtenot
Default
default
Render
Template
template
Docs/Sintax/Collections/Access

Access

Reach into arrays and maps by key or position.

Access

findReturns the first map in a slice whose named field equals the wanted value, scanning in order and returning the whole matching map.{{ items | find:'status','active' }}firstReturns the leading byte of a string as a one-byte string, so it is a letter only for ASCII text; a multi-byte character yields a broken fragment.{{ word | first }}keyReads one value out of a map by key or out of a slice by index.{{ config | key:'database.host' }}lastReturns the trailing byte of a string as a one-byte string, with the same ASCII caveat as the first modifier.{{ word | last }}pluckReads one named field from every element of a slice of maps and returns the collected values as a slice, in order.{{ users | pluck:'name' }}
Edit or read the source on GitHub
PreviousCollectionsNext find

Built with in Vilnius, Lithuania Say hello!

ProductsOpen sourceDocs GitHub