Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

append json data in file python

import json

def write_json(filename, json_data):
    with open(filename) as f:
        obj = json.load(f)

    obj.append(json_data)
    
    with open(filename,"w+") as of:
        json.dump(obj, of)
 
PREVIOUS NEXT
Tagged: #append #json #data #file #python
ADD COMMENT
Topic
Name
6+3 =