title: Transform a list of strings to JSON array using jq
body: <p>Having a list of strings (one per line) like</p>
  <pre><code>str1
  str2
  ...
  </code></pre>
  <p>how do I convert these into the JSON list <code>[&quot;str1&quot;, &quot;str2&quot;]</code>?</p>