title: Using jq with bash to run command for each object in array
body: <p>How can I run a Bash command for every JSON object in a JSON array using <code>jq</code>? So far I have this:</p>
  <pre><code>cat credentials.json | jq -r '.[] | .user, .date, .email' | mycommand -u {user} -d {date} -e {email}
  </code></pre>
  <p>This doesn't seem to work. How can I take the parameters out of the JSON array into my command?</p>
  <p>My JSON file looks something like this:</p>
  <pre><code>[
     &quot;user&quot;: &quot;danielrvt&quot;,
     &quot;date&quot;: &quot;11/10/1988&quot;,
     &quot;email&quot;: &quot;myemail@domain.com&quot;,
     ...
  ]
  </code></pre>