title: Extract JSON from CSV file and save to separate CSV file in PowerShell
body: <p>I have data in a CSV. I would like to save the columns &quot;Steps&quot; that is a JSON string to a separate CSV file. Also the &quot;Attachments&quot; key is array of strings. I have not been successful.
  I've include the content of the CSV file</p>
  <pre class="lang-none prettyprint-override"><code>Summary,Description,Steps,PreCondition1,PreCondition2,Issue key,Issue id
  Summary Data,Description data,&quot;[{&quot;&quot;id&quot;&quot;:  5495,&quot;&quot;index&quot;&quot;:  1,&quot;&quot;step&quot;&quot;:  &quot;&quot;Data steps&quot;&quot;,&quot;&quot;data&quot;&quot;:  &quot;&quot;Data 1&quot;&quot;,&quot;&quot;result&quot;&quot;:  &quot;&quot;Data results 1&quot;&quot;,&quot;&quot;attachments&quot;&quot;:  [&quot;&quot;Test&quot;&quot;]},{&quot;&quot;id&quot;&quot;:  5496,&quot;&quot;index&quot;&quot;:  2,&quot;&quot;step&quot;&quot;:  &quot;&quot;Data steps 2&quot;&quot;,&quot;&quot;data&quot;&quot;:  &quot;&quot;Data 2&quot;&quot;,&quot;&quot;result&quot;&quot;:  &quot;&quot;Data results 2&quot;&quot;,&quot;&quot;attachments&quot;&quot;: []},{&quot;&quot;id&quot;&quot;:  5497,&quot;&quot;index&quot;&quot;:  3,&quot;&quot;step&quot;&quot;:  &quot;&quot;Data steps 3&quot;&quot;,&quot;&quot;data&quot;&quot;:  &quot;&quot;Data 3&quot;&quot;,&quot;&quot;result&quot;&quot;: &quot;&quot;Data results 3&quot;&quot;,&quot;&quot;attachments&quot;&quot;: []},{&quot;&quot;id&quot;&quot;:  5498,&quot;&quot;index&quot;&quot;:  4,&quot;&quot;step&quot;&quot;:  &quot;&quot;Data steps 4&quot;&quot;,&quot;&quot;data&quot;&quot;:  &quot;&quot;Data 4&quot;&quot;,&quot;&quot;result&quot;&quot;:  &quot;&quot;Data results 4&quot;&quot;,&quot;&quot;attachments&quot;&quot;: []},{&quot;&quot;id&quot;&quot;:  5499,&quot;&quot;index&quot;&quot;:  5,&quot;&quot;step&quot;&quot;:  &quot;&quot;Data steps 5&quot;&quot;,&quot;&quot;data&quot;&quot;:  &quot;&quot;Data 5&quot;&quot;,&quot;&quot;result&quot;&quot;:  &quot;&quot;Data results &quot;&quot;,&quot;&quot;attachments&quot;&quot;: []}]&quot;,Data pre-condition1,Data pre-condition2,XXXX-1,17607
  </code></pre>
  <p><strong>Expected results:</strong></p>
  <p>id,index,step,data, result,attachments</p>
  <p>5495,1,Data steps,Data 1,Data results 1,Test</p>