Hands-on task
This task is step 2 of the course “JSON, YAML and XML in the terminal”
jq: filter by condition
/root/users.json contains an array users, where each entry has an active field (true/false). Output the names of only the active users, one per line, and write them to /root/active.txt.
Reference:jq
What you'll practise:
- jq
- json filtering
- select
- raw output
- array expansion