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

$ echo '[{"name": "Tom"}, {"name": "Jim"}]' | dasel -p json -m '.[*].name'
"Tom"
"Jim"

Put

$ echo '[{"name": "Tom"}, {"name": "Jim"}]' | dasel put string -p json -m '.[*].name' Frank
[
  {
    "name": "Frank"
  },
  {
    "name": "Frank"
  }
]

Last updated