title: Adding new key-value pairs to JSON files using Python
body: <p>I have a set of JSON files that contains some information.The below data is value for key 'BrowserInfo'.I want to extract the following information 
  <code>Title</code> , <code>Links</code>, <code>Browser</code>,<code>Platform</code>,<code>CPUs</code> from what is given below, add the above fields as keys in the JSON file and extract their values and assign to those keys.</p>
  
  <p>Title: Worlds best websit | mywebsite.com<br>Links: 225<br>Browser: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 Ubuntu Chromium/41.0.2272.76 Chrome/41.0.2272.76 Safari/537.36<br>Platform: Linux x86_64<br>CPUs: 8</p>
  
  <p>I have writtten a python program to descent into the directory and extract 'BrowserInfo' value from the JSON files.</p>
  
  <pre><code># Set the directory you want to start from
  rootDir = '/home/space'
  for dirName, subdirList, fileList in os.walk(rootDir):
      print('Found directory: %s' % dirName)
      for fname in fileList:
          fname='space/'+fname
          with open(fname, 'r+') as f:
              json_data = json.load(f)
              BrowserInfo = json_data['BrowserInfo']
              print(BrowserInfo)
  </code></pre>
  
  <p>How do I extract the values and add new key-value pairs to JSON files using Python.</p>