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

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

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -