Skip to content

Tag: node.js

Convert JSOn object into a flat JSON Array

I have a nested JSON object that getting from a mongoDB query that i would like to convert into flat JSON array .I am using nested mondo documents, but i would like to show the data in a more readble way. My JSON has the following structure: I want to show only the important information and not the structure …

internal/modules/cjs/loader.js:582 throw err

I’m getting following Console Error. Error : Cannot find module Here is the full error i’m getting in console. What should I do? Answer I had the same issue when I first tried on node js. I noticed this issue was happening to me because I had some .js files with same names in different directories…

Promises returned data ”

my data which is fetched from youtube is using nodejs is – Now I want to search 5 related videos to each video my api and api to 5 related Videos is given below It is giving the output like How to solve this pending problem or how to wait so it gets full data. Answer It happens because you