One suggestion is to use with_entries as a replacement for the 'to_entries | map(...) | from_entries' pattern. For example:
jq '.metadata.annotations | with_entries(select(.key == "label1"))'
jq '.metadata.annotations | to_entries | map(select(.key == "label1")) | from_entries'
from_entries handles nicely the Tags in a lot of awscli output, you can do things like
aws ec2 describe-instances | \ jq '.Reservations[].Instances[] | {Role: .Tags | from_entries | .role, Name: .Tags | from_entries | .name, Id: .InstanceId}' \ -C -c | sort | less -R
One suggestion is to use with_entries as a replacement for the 'to_entries | map(...) | from_entries' pattern. For example:
is equivalent to