Сообщение от рони
|
Зосимов,
let arr = [];
let student = {
name: 'John',
lastName: 'Doe',
age: 35,
gender: 'Male',
department: 'English',
car: 'Honda'
};
arr.push(student)
let data = JSON.stringify(arr);
|
теперь данные выглядят так в файле
[{"name":"John","lastName":"Doe","age":35,"gender": "Male","department":"English","car":"Honda"}]
[{"name":"John","lastName":"Doe","age":35,"gender": "Male","department":"English","car":"Honda"}]
[{"name":"John","lastName":"Doe","age":35,"gender": "Male","department":"English","car":"Honda"}]
осталось только их получить правильно с файла