title: Appending data to JSON file with python?
body: <p>I have made a small python program which writes some string inputs into a JSON file:</p>
  
  <pre><code>import json
  
  while True:
      name = input('What is your name?')
      surname = input('What is your surname')
      age = input('How old are you?')
  
      with open("info_.json", "w") as data:
          information = {name: {'surname': surname, 'age': age}}
          data.write(json.dumps(information))
          data.close()
  
      with open("info_.json", "r") as info_read:
          dict_info = json.loads(info_read.read())
          name_d = dict_info.get(name)
          print(name_d)
  </code></pre>
  
  <p>It works perfectly fine, althought the second time of the loop, the inputs overwrite the information that was written the first time. Is there any way of <strong>adding</strong> more data to a file, without overwriting?
  Thank you</p>