Hello,
Could please tell me how to escape '.'?
I already tried a few different approaches, but they all failed
examples:
./jq '.global".proxy.process.dns.in_flight"'
./jq '.global.proxy$process$dns$in_flight'
./jq '.global.proxy.process.dns.in_flight'
Thanks in advance
See issue #42 ?
Thank you,
But I failed to get it working
I have an element global and in global i got 'proxy.process.dns.in_flight'
I tried
cat _stats | ./jq '.global.["proxy.process.dns.in_flight"]'
error: syntax error, unexpected '[', expecting IDENT
.global.["proxy.process.dns.in_flight"]
^
1 compile error
I don't understand my mistake.
Thanks in advance!
No . before the []. So cat stats | ./jq '.global["proxy.process.dns.inflight"]' - just like in JavaScript.
Thank you lluchs. This fixed my problem.
Thanks iluchs for the solution. It worked
Most helpful comment
No
.before the[]. Socat stats | ./jq '.global["proxy.process.dns.inflight"]'- just like in JavaScript.