📄
Dasel
v1
v1
  • Introduction
  • Installation
    • Update
  • Use as a go package
  • Github
  • Playground
  • Usage
    • Select
    • Put
    • Put object
    • Put document
    • Delete
    • Validate
    • Flags
      • Escape HTML
      • Format
      • Multiple
      • Null
      • Merge Input Documents
    • Supported file types
  • Selectors
    • Introduction
    • Property
    • Keys and indexes
    • Index
    • Next Available Index
    • All indexes
    • Dynamic
    • Search
    • Search Optional
    • Length
    • Type
  • Notes
    • File formatting and ordering
    • Memory usage
    • Converting between formats
  • Examples
    • JQ to Dasel
    • YQ to Dasel
    • XML
    • Filter JSON API results
Powered by GitBook
On this page
  • Description
  • Usage
  • Example
  • Select
  • Put
Edit on GitHub
  1. Usage
  2. Flags

Multiple

PreviousFormatNextNull

Last updated 2 years ago

Description

Tells dasel to select or put multiple items.

This causes the selector to return all matching results rather than the first, and enables the selector.

All matches will be output on a new line.

Usage

Pass the -m, --multiple flag to or 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"
  }
]
dynamic
all indexes
select
put