D
D
Dasel
v2
Search…
⌃K

MapOf

Expects 2 or more arguments.
Expects arguments to be given in pairs, where the first argument is the property name, and the second argument is a selector that will be used to resolve the value.

Examples

$ echo '[1,2,3,4,5]' |
dasel -r json 'mapOf(lessThan,all().filter(lessThan(.,3)).merge(),moreThan,all().filter(moreThan(.,3)).merge())'
{
"lessThan": [
1,
2
],
"moreThan": [
4,
5
]
}