flycat

json jq

Aug 12th, 2022 (edited)
1,200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.29 KB | None | 0 0
  1. # Colors in pipes
  2. jq --color-output . data.json | less --RAW-CONTROL-CHARS
  3. jq -C . data.json | less -R
  4.  
  5. # Выбор, где username=all
  6. jq '.data[] | select(.username == "all")'
  7.  
  8. # Подсчёт элементов:
  9. jq '.data[] | select(.username == "all").active_unique_ips_list|length'
Advertisement
Add Comment
Please, Sign In to add comment