It is needed to read json file and write it back with uppedned changes into the end of file. For example:
//original
{"k1": "v1", "k4": "v4"}
do some magic and get:
//output
{"k1": "v1", "k4": "v4", "k2": "v2"}
The big problem here is JSON.stringify()
/ JSON.parse()
call does not garantee en order of json jey during parse
/ stringify
- so json is read into unordered map and written into unordered map again.
Can this be with javascript???