title: How to concat multiple fields to same line with jq
body: <p>If I run:</p>
  
  <pre><code>cat &lt;file&gt; | jq 
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>{
    "user": "alex",
    "num": "486",
    "time": "Thu Jun  6 16:26:06 PDT 2019",
    "pwd": "/Users/alex/codes/ores/prompt-command",
    "pid": 11047,
    "exit_code": 0,
    "cmd": "echo '123'"
  }
  {
    "user": "john",
    "num": "487",
    "time": "Thu Jun  6 16:26:24 PDT 2019",
    "pwd": "/Users/alex/codes/ores/prompt-command",
    "pid": 11108,
    "exit_code": 5,
    "cmd": "echo '456'"
  }
  {
    "user": "alex",
    "num": "488",
    "time": "Thu Jun  6 16:26:59 PDT 2019",
    "pwd": "/Users/alex/codes/ores/prompt-command",
    "pid": 11141,
    "exit_code": 5,
    "cmd": "echo '789'"
  }
  </code></pre>
  
  <p>but instead of all those fields, I just want some output like:</p>
  
  <pre><code>alex echo '123'
  alex echo '789'
  </code></pre>
  
  <p>so I tried this:</p>
  
  <pre><code>cat &lt;file&gt; | jq -r '.user .cmd'
  </code></pre>
  
  <p>but that didn't work I got this error:</p>
  
  <blockquote>
    <p>jq: error (at :63): Cannot index string with string "cmd"</p>
  </blockquote>
  
  <p>I also want to filter it so I only see my commands, something like:</p>
  
  <pre><code>cat &lt;file&gt; | jq -r '.user=alex .cmd'
  </code></pre>