News for hackers. Stuff that matters.
Re:jq 1.7 released by cryptonector on Thursday September 07, 2023 @09:45AM (#37418832)
> jq -r \ > '.apps.http.servers.srv1.routes[0] > | .match[0].header.[env.AUTH_USER_HEADER][0] = "$username"'

> That's an error because you can't select an env var key '[env.AUTH_USER_HEADER]' in the middle of a chain like that, only immediately following a pipe:

> | .match[0].header | .[env.AUTH_USER_HEADER][0] = "$username"'

You can use `env.AUTH_USER_HEADER` as a key the way you wanted. The issue is that you had to write `... | .match[0].header[env.AUTH_USER_HEADER] ...` -- no `.` between "header" and the index operator!

Re:jq 1.7 released by jpoprocks on Thursday September 07, 2023 @07:20PM (#37427030)
this was fixed in jq 1.7 :)