jq -n ' ( input | map( { key: .externalId, value: .watchers } ) | from_entries ) as $watchers_lkup | inputs | map( .watchers = $watchers_lkup[ .externalId ] ) ' watchers.json file.json