Works well enough, but it really tripped me up at first with the syntax. Had to constantly look things up while using it.<p><pre><code> jq -r \
'.apps.http.servers.srv1.routes[0]
| .match[0].header.[env.AUTH_USER_HEADER][0] = "$username"'
</code></pre>
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:<p><pre><code> | .match[0].header | .[env.AUTH_USER_HEADER][0] = "$username"'
</code></pre>
But then I need to preserve the parent object after the assignment and that pipe throws it out. Thankfully, parentheses fix that:<p><pre><code> | (.match[0].header | .[env.AUTH_USER_HEADER][0]) = "$username"'
</code></pre>
After working out the gotchas, it's quite powerful, like regex, but a little clunky, though not nearly as much as regex.