Type

Description

The type selector can be used to return the type of the current node.

Usage

1
.[@]
Copied!

Return types

The type selector can return the following types:
  • array
  • map
  • string
  • int
  • float
  • bool

Example

1
echo '{"numbers": [5, 2, 3, 1, 4]}' | dasel -r json '.[@]'
2
"map"
Copied!
1
echo '{"numbers": [5, 2, 3, 1, 4]}' | dasel -r json '.numbers.[@]'
2
"array"
Copied!
1
echo '{"numbers": [5, 2, 3, 1, 4]}' | dasel -r json '.numbers.[0].[@]'
2
"float"
Copied!
Last modified 26d ago