Writing to a specific dictionary inside a json file Python -


i have .json file information

{"items": [{"phone": "testp"}, {"phone": "test2"}]} 

i want add dictionary next available slot in array more information. have tried many ways no of them work, has got ideas?

dictionary["items"].append(new_dictionary) 

you access key "items" in dictionary, list of dictionaries, list append new dictionary


Comments

Popular posts from this blog

many to many - Django Rest Framework ManyToMany filter multiple values -

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

Java Entity Manager - JSON reader was expecting a value but found 'db' -