jq: output array of json objects
<p>Say I have the input:</p>

<pre><code>{
    "name": "John",
    "email": "john@company.com"
}
{
    "name": "Brad",
    "email": "brad@company.com"
}
</code></pre>

<p>How do I get the output:</p>

<pre><code>[
    {
        "name": "John",
        "email": "john@company.com"
    },
    {
        "name": "Brad",
        "email": "brad@company.com"
    }
]
</code></pre>

<p>I tried both:</p>

<pre><code>jq '[. | {name, email}]'
</code></pre>

<p>and </p>

<pre><code>jq '. | [{name, email}]'
</code></pre>

<p>which both gave me the output</p>

<pre><code>[
    {
        "name": "John",
        "email": "john@company.com"
    }
]
[
    {
        "name": "Brad",
        "email": "brad@company.com"
    }
]
</code></pre>

<p>I also saw no options for an array output in the documentations, any help appreciated</p>