Trying to pass a bash shell variable into a jq filter
JSON:
{ \"server1\": { \"port\": 3333, \"name\": \"foo\", \"timesincelast\": 248054 }, \"server
You could write:
.[$servername] | .port
or simply:
.[$servername].port