Put object

Description

This command allows you to modify data at a given selector.

It generally works in the same way as put, but allows you to write entire maps with a single command.

Note that put object will completely overwrite any existing data at the given selector.

Usage

dasel put object -f <file> -t <type> -t <type> <selector> <value:key=value> <value:key=value>

Omit the types and values to create an empty object/map.

Example

Put object

$ echo "" | dasel put object -p yaml -t string -t int "my.favourites" colour=red number=3
my:
  favourites:
    colour: red
    number: 3

Last updated