Closed gh-ghost closed 5 years ago
Are those JSON blocks transferred using WebSocket messages?
It requires additional scripts to be implemented, with hacks. Or just a separate non-Websocat solution.
Close analogue is:
websocat ... | jq --unbuffered '.data.count.number' | grep -m 1 -v null
, but that does not close connection on match, only somewhat later.
Workaround kludge:
websocat ... | jq --unbuffered '.data.count.number' | { grep -v null -m 1; killall websocat; }
Workaround kludge:
websocat ... | jq --unbuffered '.data.count.number' | { grep -v null -m 1; killall websocat; }
Thank You for your guide, it's helpful.
When I use this tool create a websocket, it will keep connection get data continuously, If I can just request a specific field data, when I get it then disconnect the connection?
for example, I just want to get this in the field {"data":{"count":{"number":}}}