We have 4 functions very useful for models. getNewId : searching in the array the last id and increment of 1 to return a new id. newDate : return the date of your server in ISO 8601. mustBeInArray: return a promise. Using when we need to check if a row exist via the id (Read One, Update and Delete). writeJSONFile : write new array in the JSON File data.
obterNovoId,
novaData,
estaNoArray,
escreverNoJSON