title: How do I add a Key/Value in JSON with Python?
body: <p>This may sound like an average question, but I haven't found a good answer to what I am trying to do.</p>
  
  <p>Take d.json:</p>
  
  <pre><code>{"SDA":{"Info":{"Description":"Anti Advertisment Bot, Blocks invites extensively.","Download Link":"http://sda.khionu.net/docs/, http://sda.khionu.net/docs/"}}, "Unit 02":{"Info":{"Description":"Server logging bot, c!serverlogs 'server name here if spaces' &lt;# 1-9999&gt;","Download Link":"https://discordapp.com/oauth2/authorize?client_id=222881716606468096&amp;scope=bot&amp;permissions=32768"}}}
  </code></pre>
  
  <p>I'm trying to add this to it, separated by commas: </p>
  
  <pre><code>{'Ctest': {'Info': {'Description': 'Hi', 'Download Link': 'Sure'}}}
  </code></pre>
  
  <p>I tried multiple ways to do it, but none works. Here's my current code</p>
  
  <pre><code>a = d[toolname] = {str(toolname):{"Info":{"Description": tooldesc, "Download Link": toollink}}}
  f.write(str(a))
  f.close()
  return jsonify(a), 201
  </code></pre>
  
  <p>My whole goal is to write </p>
  
  <pre><code>{'Ctest': {'Info': {'Description': 'Hi', 'Download Link': 'Sure'}}} 
  </code></pre>
  
  <p>to d.json like this</p>
  
  <pre><code>{"SDA":{"Info":{"Description":"Anti Advertisment Bot, Blocks invites extensively.","Download Link":"http://sda.khionu.net/docs/, http://sda.khionu.net/docs/"}}, "Unit 02":{"Info":{"Description":"Server logging bot, c!serverlogs 'server name here if spaces' &lt;# 1-9999&gt;","Download Link":"https://discordapp.com/oauth2/authorize?client_id=222881716606468096&amp;scope=bot&amp;permissions=32768"}}, {'Ctest': {'Info': {'Description': 'Hi', 'Download Link': 'Sure'}}}
  </code></pre>