title: jq - How to concatenate an array in json
body: <p>Struggling with formatting of data in jq.  I have 2 issues.</p>
  
  <ol>
  <li>Need to take the last array .rental_methods and concatenate them into 1 line, colon separated.</li>
  <li><code>@csv</code> doesn't seem to work with my query.  I get the error <code>string ("5343") cannot be csv-formatted, only array</code></li>
  </ol>
  
  <p>jq command is this (without the <code>| @csv</code>)</p>
  
  <pre><code>jq --arg LOC "$LOC" '.last_updated as $lu | .data[]|.[]| $lu, .station_id, .name, .region_id, .address, .rental_methods[]'
  </code></pre>
  
  <p>JSON:</p>
  
  <pre><code>{
      "last_updated": 1539122087,
      "ttl": 60,
      "data": {
          "stations": [{
              "station_id": "5343",
              "name": "Lot",
              "region_id": "461",
              "address": "Austin",
              "rental_methods": [
                  "KEY",
                  "APPLEPAY",
                  "ANDROIDPAY",
                  "TRANSITCARD",
                  "ACCOUNTNUMBER",
                  "PHONE"
                  ]
              }
          ]
      }
  }
  </code></pre>
  
  <p>I'd like the output to end up as:</p>
  
  <pre><code>1539122087,5343,Lot,461,Austin,KEY:APPLEPAY:ANDROIDPAY:TRANSITCARD:ACCOUNTNUMBER:PHONE:,
  </code></pre>