I have a JSON file that I need to use as a database to add, remove and modify users, I have this code:
'use strict';
const fs = require('fs');
let student = {  
    id: 15,
    nombre: 'TestNombre', 
    apellido: 'TestApellido',
    email: 'TestEmail@gmail.com',
    confirmado: true 
};
let data = JSON.stringify(student, null, 2);
fs.writeFileSync('personas.json', data);
But that overwrites the JSON file, and I need to append as another object, so it continues with id 15 (last one was 14).
Here is a piece of the JSON file:
{
  "personas": [
    {
      "id": 0,
      "nombre": "Aurelia",
      "apellido": "Osborn",
      "email": "aureliaosborn@lovepad.com",
      "confirmado": false
    },
    {
      "id": 1,
      "nombre": "Curry",
      "apellido": "Jefferson",
      "email": "curryjefferson@lovepad.com",
      "confirmado": true
    },
  ]
}
How can I do this?