Template functions · Lists
select
Turn a JSON object into a list of key/value pairs.
select mapEach pair has .Key and .Value. Map order is random, so sort the result by Key or Value.
Example
{{ $site := data "site.json" }}
{{ range sort "Key" "asc" (select $site.social) }}
<a href="{{ .Value }}">{{ .Key }}</a>
{{ end }}Other functions
data
sources
sort
filter
limit
offset
paginate
pages
page
path
hash
json
contains
html
js
css