For the complete documentation index, see llms.txt. This page is also available as Markdown.

Select

Select is the default command for the dasel cli.

The select command allows you to select data from any supported data structure.

Usage

$ echo '{"name":{"first":"Tom","last":"Wright"}}' | dasel -r json 'name.first'
"Tom"

See the function documentation for information on the available selectors.

Flags/Args

Flag
Type
Description
Default

--colour

bool

Print colourised output.

false

--escape-html

bool

Escape HTML tags when writing output.

false

-f, --file

string

The file to query. If no file is given dasel reads from stdin.

--pretty

bool

Pretty print the output.

true

-r, --read

string

The parser to use when reading. If no parser is given dasel attempts to find a parser from the --file flag.

-s, --selector

string

The selector used to query the input data. If no flag is given dasel attempts to use the first argument as the selector.

-w, --write

string

The parser to use when writing. If no parser is given dasel will use the --read flag.

--csv-comma

string

The separator used when working with csv files.

,

--csv-write-comma

string

The separator used when writing csv files.

value of --csv-comma

--csv-comment

string

The comment character used when working with csv files.

--csv-crlf

bool

True to write csv files with a \r\n instead of \n.

false

Last updated