title: Join two JSON files and create a new one
body: <p>I can't find a lookup table where all country codes are packed together with their names in different languages, so I have to create my own file.</p>
  <p>Let's start with two languages, German and English.</p>
  <p>German JSON file example:</p>
  <pre><code>[{&quot;id&quot;:4,&quot;name&quot;:&quot;Afghanistan&quot;,&quot;alpha2&quot;:&quot;af&quot;,&quot;alpha3&quot;:&quot;afg&quot;},
  {&quot;id&quot;:818,&quot;name&quot;:&quot;Ägypten&quot;,&quot;alpha2&quot;:&quot;eg&quot;,&quot;alpha3&quot;:&quot;egy&quot;},
  {&quot;id&quot;:248,&quot;name&quot;:&quot;Åland&quot;,&quot;alpha2&quot;:&quot;ax&quot;,&quot;alpha3&quot;:&quot;ala&quot;},
  {&quot;id&quot;:8,&quot;name&quot;:&quot;Albanien&quot;,&quot;alpha2&quot;:&quot;al&quot;,&quot;alpha3&quot;:&quot;alb&quot;},
  {&quot;id&quot;:12,&quot;name&quot;:&quot;Algerien&quot;,&quot;alpha2&quot;:&quot;dz&quot;,&quot;alpha3&quot;:&quot;dza&quot;}]
  </code></pre>
  <p>English JSON file example:</p>
  <pre><code>[{&quot;id&quot;:4,&quot;name&quot;:&quot;Afghanistan&quot;,&quot;alpha2&quot;:&quot;af&quot;,&quot;alpha3&quot;:&quot;afg&quot;},
  {&quot;id&quot;:248,&quot;name&quot;:&quot;Åland Islands&quot;,&quot;alpha2&quot;:&quot;ax&quot;,&quot;alpha3&quot;:&quot;ala&quot;},
  {&quot;id&quot;:8,&quot;name&quot;:&quot;Albania&quot;,&quot;alpha2&quot;:&quot;al&quot;,&quot;alpha3&quot;:&quot;alb&quot;},
  {&quot;id&quot;:12,&quot;name&quot;:&quot;Algeria&quot;,&quot;alpha2&quot;:&quot;dz&quot;,&quot;alpha3&quot;:&quot;dza&quot;},
  {&quot;id&quot;:16,&quot;name&quot;:&quot;American Samoa&quot;,&quot;alpha2&quot;:&quot;as&quot;,&quot;alpha3&quot;:&quot;asm&quot;},
  </code></pre>
  <p>I can read both files like that</p>
  <pre><code>with open('german.json') as fd:
      ger = json.load(fd)
  </code></pre>
  <p>Since we have unique ids for the countries we can join them together.
  The result should look something like that</p>
  <pre><code>[{&quot;id&quot;:4,&quot;ger&quot;:&quot;Afghanistan&quot;,&quot;eng&quot;:&quot;Afghanistan&quot;,&quot;alpha2&quot;:&quot;af&quot;,&quot;alpha3&quot;:&quot;afg&quot;},
  {&quot;id&quot;:818,&quot;ger&quot;:&quot;Ägypten&quot;,&quot;eng&quot;:&quot;Egypt&quot;,&quot;alpha2&quot;:&quot;eg&quot;,&quot;alpha3&quot;:&quot;egy&quot;},
  {&quot;id&quot;:248,&quot;ger&quot;:&quot;Åland&quot;,&quot;eng&quot;:&quot;Åland Islands&quot;,&quot;alpha2&quot;:&quot;ax&quot;,&quot;alpha3&quot;:&quot;ala&quot;},
  {&quot;id&quot;:8,&quot;ger&quot;:&quot;Albanien&quot;,&quot;eng&quot;:&quot;Albania&quot;,&quot;alpha2&quot;:&quot;al&quot;,&quot;alpha3&quot;:&quot;alb&quot;},
  {&quot;id&quot;:12,&quot;ger&quot;:&quot;Algerien&quot;,&quot;eng&quot;:&quot;Algeria&quot;,&quot;alpha2&quot;:&quot;dz&quot;,&quot;alpha3&quot;:&quot;dza&quot;}]
  </code></pre>
  <p>What's the most effective way to join the lists together considering that other languages can be added in the future?</p>