map( { (.name|tostring): . } ) | add
(The tostring
is for safety/robustness.)
INDEX/1
If your jq has INDEX/1
(introduced after the release of version 1.5), you can simply write:
INDEX(.name)
map( { (.name|tostring): . } ) | add
(The tostring
is for safety/robustness.)
If your jq has INDEX/1
(introduced after the release of version 1.5), you can simply write:
INDEX(.name)