title: Bag of words a json formatted value within a SQL Server tables column?
body: <p>I have a json formatted value inside a column (named <code>column2</code>) in my table. It looks like this:</p>
  <pre class="lang-json prettyprint-override"><code>{
    &quot;conversation_id&quot;: &quot;projects/e44ftgAWERGaqrwgr3grg&quot;,
    &quot;participant_id&quot;: &quot;pCZXSAEWGFn/participants/&quot;,
    &quot;reply_audio&quot;: {},
    &quot;response&quot;: {
      &quot;queryResult&quot;: {
        &quot;action&quot;: &quot;input.welcome&quot;,
        &quot;allRequiredParamsPresent&quot;: true,
        &quot;diagnosticInfo&quot;: {
          &quot;webhook_latency_ms&quot;: 593
        },
        &quot;fulfillmentMessages&quot;: [
          {
            &quot;text&quot;: {
              &quot;text&quot;: [
                &quot;&lt;speak&gt;&lt;break time=\&quot;50ms\&quot;/&gt; &lt;prosody rate=\&quot;90%\&quot;&gt;For navigation &lt;break time=\&quot;150ms\&quot;/&gt; tell me where you’d like to go. &lt;break time=\&quot;200ms\&quot;/&gt; otherwise  &lt;break time=\&quot;50ms\&quot;/&gt; please say advisor&lt;/prosody&gt; &lt;/speak&gt;&quot;
              ]
            }
          }
        ],
        &quot;intent&quot;:........
      }
    }
  }
  </code></pre>
  <p>I am trying to put all the words between the [{text}] and &quot;]}}] element. So, ideally, I would want the output to look like this (each word is separated by a comma):</p>
  <pre><code>[For,navigation,tell,me,where,you’d,like,to,go,.,otherwise,please,say,advisor]
  </code></pre>
  <p>This is what I have so far:</p>
  <pre><code>SELECT
      sesh_id,date,
      CASE
          WHEN column1 IN ('index1')
              THEN ( REGEXP_REPLACE(REGEXP_REPLACE ( REGEXP_REPLACE(
        REGEXP_REPLACE(column2,&quot;\\.&quot;,&quot;&quot;),&quot;\\?&quot;,&quot;&quot;),&quot;\\&lt;SPEAK&gt;&quot;,&quot;\\ . STALINE&quot;)
        ,&quot;\\&lt;/SPEAK&gt;&quot;,&quot;\\ ENDLINE .&quot;))
              ELSE (column2)
      END ARRAY_of_words
  FROM
      table1
  </code></pre>
  <p>Is there any fast way to accomplish this task? Any ideas or suggestions would be appreciated.</p>