Hands-on task
This task is step 16 of the course “JSON, YAML and XML in the terminal”
jq: top by field into a new object
From /root/users.json find the user with the highest number of logins and build a new JSON object for them of the form {"top": "<name>", "logins": <number>}, writing it to /root/top.json.
Reference:jq
What you'll practise:
- jq
- sort_by
- object construction
- extremum selection
- json