Previously, the node followed the webhook and the received data was converted to the format I needed… now I need to change the location of the
node… but in this case, I don’t know how to get to the webhook node to get data from it
const result = []
for (const item of $input.all()) {
const photo_arr = JSON.parse(item.json.body.tg_all_photo_massiv)
for (const photo of photo_arr.photo) {
result.push({
json: {
url: photo
}
})
}
}
return result;
tg_all_photo_massiv:{“status”: true, “photo”: [“https://files.salebot.pro/uploads/message_files/5050e27a-aa14-4797-854a-da964c7ce0f8.jpg”, “https://files.salebot.pro/uploads/message_files/38e2855d-f99f-4e53-8503-26d45b0a03c7.jpg”], “kolvo”: 2}