title: Creating a struct array from a pyspark dataframe column
body: <p>I am looking for help on Pyspark dataframe with a column such as this one:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Value</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>id1:xxx1xxx</td>
  </tr>
  <tr>
  <td>id2:666x666</td>
  </tr>
  <tr>
  <td>id1:xxx4xxx||id2:555x555||id1:xxx5xxx</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Want I want to create is an additional column in which these values are in an struct array. Purpose of this is to match with values with another dataframe. I hope this question makes sense in any way.</p>
  <p>Have been able to convert the dataframe column into the following:</p>
  <blockquote>
  <p>[&quot;id1:xxx7xxx&quot;, &quot;id2:777l777&quot;, &quot;id1:999xx99&quot;]</p>
  </blockquote>
  <p>Any suggestions on how to convert this into a structured array?</p>
  <p>thanks</p>