Branches
This feature is potentially unstable. Must be used with the --unstable
flag.
Dasel includes the concept of branches. branch
allows you to perform one or more sub queries, with each query output as a separate document.
This documentation is a little light, but will be improved with time.
Examples
Without branching
When we don't branch, notice how the result is an array containing numbers.
Branching on numbers
When we branch on the numbers, we actually get separate JSON documents out at the end.
Filtering on a branch
Since filter
must be used on arrays and a branch isn't technically an array, we can instead use ignore
. This marks a specific branch as irrelevant and it will be stripped from the result.
Last updated