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
  • Lists
  • Objects
  • Nested Objects
Edit on GitHub
  1. Functions

All

All takes any list or object value and extracts each element within it, allowing you to access each of them individually.

Examples

Lists

echo '["a", "b", "c"]' | dasel -r json
[
  "a",
  "b",
  "c"
]

echo '["a", "b", "c"]' | dasel -r json 'all()'
"a"
"b"
"c"

Objects

echo '{"x": 1, "y": 2, "z": 3}' | dasel -r json
{
  "x": 1,
  "y": 2,
  "z": 3
}

echo '{"x": 1, "y": 2, "z": 3}' | dasel -r json 'all()'
1
2
3

Nested Objects

echo '{
  "users": [
    {
      "name": "Tom"
    },
    {
      "name": "Jim"
    }
  ]
}' | dasel -r json 'users.all().name'
"Tom"
"Jim"
PreviousSelector OverviewNextAnd

Last updated 2 years ago