Branches
Last updated
$ cat numbers.json | dasel -i json 'branch(numbers...)'
{
"x": 1
}
{
"x": 2
}
{
"x": 3
}$ echo '[1, 2, 3]' | dasel -i json 'branch().if ($this == 2) { ignore() } else { $this }'
1
3$ echo '{"name": "Tom", "age": 30, "city": "London"}' \
| dasel -i json 'branch(name, age)'
"Tom"
30