I'm trying to automate the adding of new objects to an existing json file. I looked all around the web but only found adding data and stuff but not an whole object. This is how the file that i wanna edit looks:
[
{"id":"123","name":"carl"}
]
and i want to go to
[
{"id":"123","name":"carl"},
{"id":"1234","name":"carl2"}
]
Thank you for all your answers but i don't think everyone is completely understanding what i mean i have tried some of the answers but then i get this:
[
"{"id":"123","name":"carl"}"
]"{"id":"1234","name":"carl2"}"
and i want everthing inbetween the [].
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…