title: Convery yaml array to string array
body: <p>I have a yq read command as below,</p>
  <pre><code>groups=$(yq read  generated/identity-mapping.yaml &quot;iamIdentityMappings.[0].groups&quot;)
  </code></pre>
  <p>It reads iamIdentityMappings from below yaml:</p>
  <pre><code>iamIdentityMappings:
  - groups:
    - Appdeployer
    - Moregroups
  </code></pre>
  <p>It stores group as below,</p>
  <pre><code>- Appdeployer
  - Moregroups
  </code></pre>
  <p>But I want to store groups as below.(comma separated values)</p>
  <pre><code>groups=&quot;Appdeployer&quot;,&quot;Moregroups&quot;
  </code></pre>
  <p>How to do this in bash?</p>