Updating JSONField in django rest framework
<p>I currently became familiar with using JSONField in django rest-framework, but I could not find any straight forward way to update a key in a stored json. There are many ways to filter JSONField depends on its internal keys, but it seems that there is no way to change, update or delete a key from already stored JSONField. But it seems that postgres can do some modifications on json keys as <a href="https://stackoverflow.com/a/23500670/2335245">this answer</a> explained.</p>

<p>Is there any function which is able to do modifications on JSONFields. If there is not any direct command to do this, what is the best way to implement modifications of a JSONField?</p>

<p><strong>Edit:</strong></p>

<p>As an example if I have a model like this:</p>

<pre><code>class Thing(models.Model):
    name = models.CharField()
    properties = JSONField()
</code></pre>

<p>And in <code>properties</code> I stored a json like this :</p>

<pre><code>{
"color" : "red",
"size" : "large",
"cost" : 1234
}
</code></pre>

<p>Then I want to change the color to "green" by using django commands.</p>