let data;
await page.on('response', async (response) => {
    if (response.url().includes("https://www.ubereats.com/api/getFeedV1")) {
        const j = await response.json();
        console.log(j);
    }
});
console.log(data);
This is a code segment of a web scraper with a puppeteer library.
Inside this await, I can log the j variable. But I need to assign it to the data variable. How can I do that?
 
    