const phrasesObjectList = [
{
"count": 4,
"phrase": "test ..."
}
];
const myPhrasesList = new Map(phrasesObjectList.map(item => (
[item.phrase, item]
)));
// ---
for (object of wsData) {
const item = myPhrasesList.get(object.description)
if (!item) {
continue;
}
this.notification(object, item.phrase).then()
}
const vk = new VK({
token: <откуда угодно подставить здесь>
});
DEBUG=vk-io:updates node your-bot.js
set DEBUG=vk-io:updates
node your-bot.js