help me pls . I write several arrays to a txt file, and then I want to parse them, what am I doing wrong
fs.readFile("./data.txt", "utf8",
function(error,dataRes){
console.log('Читаю данные')
if(error) throw error;
data = JSON.parse('['+dataRes+']'.replace(/][/g,'],['));
console.log(data)
createitem();
});
data.txt(example)
[{"update":"Сегодня, 14:44"},{"update":"Сегодня, 14:43"},{"update":"Сегодня, 14:31"}][{},{},{},{"link":"https://www.doska.by//msg/animals/cats/maine-coon/bdnkh.html"}]