Question: Let's say that I have a set of data below:

```
{_id: "something", array: ["a", "b", "c", "d"]},  // 1
{_id: "something", array: ["a", "b", "d"]},  // 2
{_id: "something", array: ["b", "c", "d"]},  // 3
{_id: "something", array: ["a", "d"]},  // 4
{_id: "something", array: ["a", "b"]},  // 5
{_id: "something", array: ["d"]},  // 6
{_id: "something", array: ["c"]},  // 7
{_id: "something", array: []},  // 8
{_id: "something"},  // 9
{_id: "something", array: ["a", "b", "c", "d", "e", "f", etc...]},  // 10

```

I want to find the documents that have the array consist nothing outside of "a" and "d" in the array. So the wanted output should be 4th, 6th, 8th and 9th from the data. How should I write the query? 

Both $in and $nin could not get what I want (as using $nin will require me to input too much possibilities in the query).

Another note, I am using MongoDB v3.2 with Mongoose.

Addon note after receiving answers:   

- P.S. In this example, "a" and "d" is just example of 2 exclusion. However in actual implementation, it is a value inserted choosed by user. So it does not limit to 2 exclusion, which could later be "b", "c" and "d", or even more values base on user input.

Answer: 
Utilize the Composer autoloader and add then add an environment variable like `$DEPLOY_SERVER=user@host` to your `.env` file.

```
@include('vendor/autoload.php')

@setup
    (new Dotenv\Dotenv(__DIR__, '.env'))->load();
    $ssh = getenv('DEPLOY_SERVER');
@endsetup

@servers(['web' => $ssh])

@story('deploy')
    composer
@endstory

@task('composer')
    echo "Deployment complete, you connected as: {{ $ssh }}";
@endtask

```
```
<?php 
   //all below variables are coming from arguments passes with envoy run command
   $name = isset($name) ? $name : null; //web
   $task = isset($task) ? $task : null; //eg list
   $command = isset($command) ? $command : null; //ls (command to run)
   $ip = isset($ip) ? $ip : null; //suppose host is 127.0.0.1
   $user = isset($user) ? $user : null;    
?>

 //Server Connection settings
 {{ $__container->servers([$name => [str_replace('"', '', trim($ip)]])) }}

//Task Details and add the command to run
{{ $__container->startTask($task) }}
    {{$command}}
{{ $__container->endTask() }}

//Open console and in project directory where envoy installed
//envoy command will be like this    
envoy run list --task=list --name=web  --command=ls --ip=127.0.0.1 --user=user

```