>_ IzzyLab

Topic breakdown

To make jq process several files at once as a single input, you use the slurp flag -s: it collects all input JSON values into one shared array, where .[0] is the first file and .[1] the second. Joining by key (join) is a nested iteration: for each element of one array we save it into a variable via ... as $name, iterate over the second array and keep matches with the select(...) filter. From the found pair the {...} constructor assembles the right object, and the outer brackets make the final array.

What's checked

  1. arrays joined by id (name+age)

What it looks like