select
commands since v1.18.0
..
is equal to the node found at the given selector.select
function with a selector to access values, but you can access properties in the path with .field.subField
if preferred.select "selector"
selectMultiple "selector"
query
select
.queryMultiple
selectMultiple
.isFirst
true
if the node being formatted is the first in a list of selected nodes.isLast
true
if the node being formatted is the last in a list of selected nodes.format "template"
selectMultiple
.newline
text/template
package so dasel also supports an array of conditional and loop statements by default.{{ if x }} x is true {{ else }} x is false {{ end }}
{{ if not x }} x is
false {{ else }} x is true {{ end }}
Numbers:
{{ range .numbers -}}
- {{ . }}
{{ end }}