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

cron - how to properly run Python script with crontab on every system startup -

elasticsearch - Is the order of operations guaranteed in a bulk update? -

Slow performance first queries on SQL Azure -