passing arguments to jq filter

The jq program .dev.projects."$v" in your example will literally try to find a key named "$v". Try the following instead:

jq --arg v "$PRJNAME" '.dev.projects[$v]' config.json 

Leave a Comment