-
🏍️ @cannereauTry my compact version ;)
#!/usr/bin/env bash yq -oj | jq -e --arg KEY ${1:-item} '. as $input | [path(..) | select(last == $KEY)] | [foreach .[] as $item (null; $input | getpath($item))] | unique | {$KEY: .}'
Please register or sign in to comment