Answer the question
In order to leave comments, you need to log in
I don't understand how to do it?
How to use object from vk api messages getConversationmMembers, and save to json
Answer the question
In order to leave comments, you need to log in
use fs module and save this object to json file
const fs = require('fs');
const json = require('./file.json'); // в этом файле []
let object = await /*здесь вводишь этот АПИ метод с нужными параметрами*/
json.push(object); // добавляем в массив (из файла file.json) объект, только что полученный запросом.
fs.writeFileSync("./file.json", JSON.stringify(file, null, "\t")); // перезаписываем данные из переменной file в file.json
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question