Hands-on task
This task is step 9 of the course “curl and HTTP APIs”
Extract a field from a JSON response
The server serves JSON at http://localhost/api.json. Fetch it, extract the value of the user field, and write only that value to /root/user.txt.
In the Site tab, open the /api.json link — the browser shows the whole JSON, but you need just one field.
What you'll practise:
- curl
- jq
- json
- pipeline
- parsing