javascript - Insert object data into JSON file -


i know it's possible read , data of json file, didn't find information on how write object json file using jquery. understand jquery, dont have idea how this.

this structure of json file:

{     "1": [         "6-5-2015",          "7-5-2015",          "10-5-2015"     ] } 

this object variable want write json file:

var object = {"2": ["9-5-2015", "14-5-2015", "22-5-2015"]}; 

how can push or insert object end of json file , save it, json file this?

{     "1": [         "6-5-2015",          "7-5-2015",          "10-5-2015"     ],     "2": [         "9-5-2015",          "14-5-2015",          "22-5-2015"     ] } 

you cannot write file locally javascript, major security concern. suggest move file server , public api send new content , write server-side. request file in order read it. remember have lock , release file accordingly in order avoid loosing changes between requests.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -