title: json file creation from multiple dictionaries in python
body: <p>I have 3 different types of properties like below</p>
  
  <pre><code>devices
  iphone
  ipad
  ipod
  watch
  
  city
  NY
  SFO
  LA
  NJ
  
  Company
  Apple
  Samsung
  Walmart
  </code></pre>
  
  <p>Now I want create a <code>json</code> file using the properties.</p>
  
  <p>For example for <code>devices</code> I have done like below.</p>
  
  <p>I created a <code>dictionary</code> manually in <code>python</code> like below.</p>
  
  <pre><code>device_dict = {'device1': 'iphone', 'device2': 'ipad', 'device3': 'ipod', 'device4': 'watch'}
  </code></pre>
  
  <p>Then converted the <code>dictionary</code> to a <code>json</code> file like below.</p>
  
  <pre><code>import json
  out_file = open("test.json","w")
  json.dump(my_dict,out_file, indent=4)                                    
  out_file.close()
  </code></pre>
  
  <p>I am able to create <code>3</code> separate <code>json</code> like below but How can I do for all the <code>3</code> properties into a single file. </p>