Dasel
v2
v2
  • Introduction
  • GitHub
  • Supported file formats
  • Memory usage
  • Installation
  • Commands
    • Select
    • Put
    • Delete
  • Functions
    • Selector Overview
    • All
    • And
    • Append
    • Count
    • Equal
    • Filter
    • FilterOr
    • First
    • Index
    • Join
    • Key
    • Keys
    • Last
    • Len
    • LessThan
    • MapOf
    • Merge
    • MoreThan
    • Not
    • Or
    • OrDefault
    • Parent
    • Property
    • String
    • Null
    • This
    • Type
  • Examples
    • Using dasel as a go package
    • Basics
    • Change file format
    • Filtering objects based on present/missing key
Powered by GitBook
On this page
  • Examples
  • This
Edit on GitHub
  1. Functions

Type

Accepts no arguments.

Returns the type of the current value.

Possible return values are:

  • string

  • number

  • bool

  • array

  • object

  • null

  • unknown

Examples

This

$ echo '[
  "x",
  false,
  true,
  1,
  1.1,
  {"x":1},
  [1]
]' | dasel -r json 'all().type()'
"string"
"bool"
"bool"
"number"
"number"
"object"
"array"
PreviousThisNextUsing dasel as a go package

Last updated 1 year ago