Combining JSON Files Without Overriding
<p>I have 2 JSON files that have the same names for keys. How can I combine these files without overriding in Python? I have tried both of these methods:</p>

<pre><code>z = json_one.copy()
z.update(json_two)
</code></pre>

<p>^This overrides the data that is in json_one.</p>

<pre><code>json_one['metros'].append(json_two['metros'])
</code></pre>

<p>^This is almost correct, but adds unnecessary square brackets.</p>

<p>Here are my 2 files:
json_one:</p>

<pre><code>"metros" : [
    {
        "code" : "SCL" ,
        "name" : "Santiago" ,
        "country" : "CL" ,
        "continent" : "South America" ,
        "timezone" : -4 ,
        "coordinates" : {"S" : 33, "W" : 71} ,
        "population" : 6000000 ,
        "region" : 1
    } , {
        "code" : "LIM" ,
        "name" : "Lima" ,
        "country" : "PE" ,
        "continent" : "South America" ,
        "timezone" : -5 ,
        "coordinates" : {"S" : 12, "W" : 77} ,
        "population" : 9050000 ,
        "region" : 1
    } 
]
</code></pre>

<p>json_two:</p>

<pre><code>"metros" : [
    {
       "code": "CMI",
       "name": "Champaign",  
       "country": "US", 
       "continent": "North America", 
       "timezone": -6, 
       "coordinates": {"W": 88, "N": 40},
       "population": 226000, 
       "region": 1
     }
]
</code></pre>

<p>The file I want created is this:</p>

<pre><code>"metros" : [
    {
        "code" : "SCL" ,
        "name" : "Santiago" ,
        "country" : "CL" ,
        "continent" : "South America" ,
        "timezone" : -4 ,
        "coordinates" : {"S" : 33, "W" : 71} ,
        "population" : 6000000 ,
        "region" : 1
    } , {
        "code" : "LIM" ,
        "name" : "Lima" ,
        "country" : "PE" ,
        "continent" : "South America" ,
        "timezone" : -5 ,
        "coordinates" : {"S" : 12, "W" : 77} ,
        "population" : 9050000 ,
        "region" : 1
    } , {
        "code": "CMI",
        "name": "Champaign",  
        "country": "US", 
        "continent": "North America", 
        "timezone": -6, 
        "coordinates": {"W": 88, "N": 40},
        "population": 226000, 
        "region": 1
     }
]
</code></pre>

<p>How can this be done in Python?</p>