Hands-on task
This task is step 12 of the course “JSON, YAML and XML in the terminal”
jq: join two arrays by key
You have two files: /root/names.json ([{id,name}]) and /root/ages.json ([{id,age}]). Join them by id and write to /root/joined.json an array of {name, age} objects.
What you'll practise:
- jq
- slurp -s
- join by key
- variables in jq
- select