D
D
Dasel
v2
Search
K

Delete

The delete command allows you to delete data in any supported data structure.

Usage

$ echo '{"name":{"first":"Tom","last":"Wright"}}' |
dasel delete -r json 'name.last'
{
"name": {
"first": "Frank"
}
}
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.
-o, --out
string
The file to write results to. If no file is given dasel writes to --file. If --file is stdin, dasel writes to stdout.
--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 attempts to find a parser from the --out flag. If no --out flag is given dasel uses the --read flag.