title: Update correctly the fields of the json file for REST API
body: <p>I am retrieving a json file with REST API using a GET in python and want to retrieve the json file update some values of it and then update that value. My get is the following:</p>
  
  <pre><code> r1 = requests.get(url)
  </code></pre>
  
  <p>It returns the whole json file. Now I want to update some values of the json and put it back using PUT REST API call. My put command is the following:</p>
  
  <pre><code>requests.put(url, json=r1)
  </code></pre>
  
  <p>The fields I want to update are the following:</p>
  
  <pre><code>r1.json()['a']['a'] = 2 // print r1.json()['a']['a'] -&gt;1
  r1.json()['a']['b'] = 2 // print r1.json()['a']['b'] -&gt;1
  r1.json()['a']['c'] = 2 // print r1.json()['a']['c'] -&gt;1
  </code></pre>
  
  <p>My question is how can I update correctly the fields of my json?</p>