I am trying to find npm packages installed or not in my angular project using nodejs.
How to get installed packages from package.json to check this.
I have one array with packages.
Example:

```
var npmpackagesarr=["example-ng6-input","example-ng6-radio","example-ng6-combo"];

   for(var i=0;i<npmpackagesarr.length;i++){

    if(npmpackagesarr[i]=="????"){
      console.log("Hey..this package already installed");
    }
    else{
      console.log("Hey..this package not installed");
    }

   }

```

How can I identify above the array npm packages installed or not?