All
All takes any list or object value and extracts each element within it, allowing you to access each of them individually.
echo '["a", "b", "c"]' | dasel -r json
[
"a",
"b",
"c"
]
echo '["a", "b", "c"]' | dasel -r json 'all()'
"a"
"b"
"c"
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
echo '{
"users": [
{
"name": "Tom"
},
{
"name": "Jim"
}
]
}' | dasel -r json 'users.all().name'
"Tom"
"Jim"
Last modified 9mo ago