Multiple

Description

Tells dasel to select or put multiple items.
This causes the dynamic selector to return all matching results rather than the first, and enables the all indexes selector.
All matches will be output on a new line.

Usage

Pass the -m, --multiple flag to select or put commands.

Example

Select

1
echo '[{"name": "Tom"}, {"name": "Jim"}]' | dasel -p json -m '.[*].name'
2
"Tom"
3
"Jim"
Copied!

Put

1
echo '[{"name": "Tom"}, {"name": "Jim"}]' | dasel put string -p json -m '.[*].name' Frank
2
[
3
{
4
"name": "Frank"
5
},
6
{
7
"name": "Frank"
8
}
9
]
Copied!
Last modified 6mo ago