Writing to a specific dictionary inside a json file Python
<p>I have a .json file with some information    </p>

<pre><code>{"items": [{"phone": "testp"}, {"phone": "Test2"}]}
</code></pre>

<p>I want to add another dictionary into the next available slot in the array with some more information. I have tried many ways however no of them work, has anyone got any ideas?</p>

<p>You can read the json into a variable using load function.</p>

<p>And then append the value of array using </p>

<pre><code>myVar["items"].append(dictVar)
</code></pre>

python json dictionary