title: split output of bash array into lines
body: <p>I'm writing a bash script that takes a user name from user input, and displays their AWS access keys and creation dates.</p>
  
  <p>I use jq to parse the output of the command.</p>
  
  <p>The output looks like this:</p>
  
  <pre><code>Enter a user name: 
  ralph
  User ralph keys:
  AKIAJS7KPHZCQRQ5FJWA
  2016-08-31T15:38:18Z
  AKIAICDOHVTMEAB6RM5Q
  2018-02-08T03:55:51Z
  </code></pre>
  
  <p>How can I split that output so that the access key is listed next to the date?</p>
  
  <p>I want the output to look like this:</p>
  
  <pre><code>AKIAJS7KPHZCQRQ5FJWA : 2016-08-31T15:38:18Z
  AKIAICDOHVTMEAB6RM5Q : 2018-02-08T03:55:51Z
  </code></pre>
  
  <p>This is my code so far:</p>
  
  <pre><code>echo "Enter a user name: "
     read -r user_name
  
     keys=( $(aws iam list-access-keys --profile=prod  | jq -r '.AccessKeyMetadata[] | (.AccessKeyId, .CreateDate)') )
  
     echo "User $user_name keys:"
     for key in "${keys[@]}"
       do
         echo "$key"
     done
  </code></pre>