title: Reorder the values in array containing strings in Bigquery
body: <p>I have a bigquery column &quot;JSON&quot; which is of JSON type. The column data looks something like below</p>
  <pre><code>&quot;{
  &quot;&quot;placement&quot;&quot;: {
      &quot;&quot;daypart_targeting&quot;&quot;: {
          &quot;&quot;part&quot;&quot;: [
              {
                  &quot;&quot;start_time&quot;&quot;: &quot;&quot;06:00AM&quot;&quot;,
                  &quot;&quot;end_time&quot;&quot;: &quot;&quot;11:59PM&quot;&quot;,
                  &quot;&quot;start_day&quot;&quot;: &quot;&quot;SUNDAY&quot;&quot;,
                  &quot;&quot;end_day&quot;&quot;: &quot;&quot;SUNDAY&quot;&quot;
              },
              {
                  &quot;&quot;start_time&quot;&quot;: &quot;&quot;06:00AM&quot;&quot;,
                  &quot;&quot;end_time&quot;&quot;: &quot;&quot;11:59PM&quot;&quot;,
                  &quot;&quot;start_day&quot;&quot;: &quot;&quot;MONDAY&quot;&quot;   ,
                  &quot;&quot;end_day&quot;&quot;: &quot;&quot;MONDAY&quot;&quot;
              }
          ]
      },
      &quot;&quot;industry&quot;&quot;: null,
  }
  </code></pre>
  <p>}&quot;</p>
  <p>I have tried a query like below:
  select
  PlacementID,
  split(replace(replace(regexp_replace(JSON_EXTRACT(JSON, '$.placement.daypart_targeting.part'), ',&quot;end_day&quot;:[^/{]*', ''), '&quot;', ''), '[{', ''), '{') as time from project.dataset.table</p>
  <p>The output is:</p>
  <pre><code>Row PlacementID daypart 
  1   53108736    start_time:06:00AM,end_time:11:59PM,start_day:SUNDAY
                  start_time:06:00AM,end_time:11:59PM,start_day:MONDAY
  </code></pre>
  <p>I want to reorder the values of the output.
  For eg: My output should be like</p>
  <p>start_day:SUNDAY,start_time:06:00AM,end_time:11:59PM
  start_day:MONDAY,start_time:06:00AM,end_time:11:59PM</p>