Hi, I have a file comments.json that contains the following:
{
"comments": [
{
"id": 1,
"post_id": 2,
"name": "Javi",
"email": "[email protected]",
"body": "Esto es un post",
"created_at": "2017-12-29"
},
{
"id": 2,
"post_id": 1,
"name": "Pepe",
"email": "[email protected]",
"body": "Otro post de pepe",
"created_at": "2017-12-29"
}
]
}
How can I add the following to this file:
{
"id": 3,
"post_id": 1,
"name": "Juan",
"email": "[email protected]",
"body": "nuevo post",
"created_at": "2017-12-29"
}