opened
sahas-
username_0
is there a way to do append new objects to a file?
does it support append file?
issue
created
ajsingh007
username_1
I have the same question. Its working well for me but it overwrites the existing json rather than adding to it
comment
created
dudleyjosh
username_2
Same here... this would be a perfect little json to file utility if it included fs.appendFile() and fs.appendFileSync() functionality too.
comment
created
SCBuergel
username_3
:+1: without this I cant use it.
comment
created
kamikazechaser
username_4
please support append file
comment
created
andela-anandaa
username_5
See [my comments here](https://github.com/username_7/node-jsonfile/issues/67#issuecomment-287752793), I think it's related.

I had a similar issue, wanted to to hack our `package.json` file to update the `browser` key depending on the environment, and this approach worked okay. 

**TL;DR - read the file in the object, update the update, and write the object back to the file afresh.**
comment
created
RyanZim
username_6
As discussed in https://github.com/username_7/node-jsonfile/issues/67, you can use `Object.assign` to accomplish something like this. You can't truly append to a JSON file in the filesystem sense, so I don't see the point of adding this syntax sugar to jsonfile.

@username_7 what are your thoughts here?
comment
created
jprichardson
username_7
Agreed. I'd prefer to rework (move to its own section) the README a bit to make it very clear and distinct on the two cases of appending or updating.
comment