I have a JSON file that looks like this
{
"name": "John Doe",
"address": "9 School Rd"
}
how do I append this file in node.js? When I try fs.appendFile the JSON file ends up looking like this
{
"name": "John Doe",
"address": "9 School Rd"
},
"nickname": "shmee"
however this is obviously not what I want it to look like. Thanks for your help!
"nickname"property to the file?