title: Postgres: How to convert a json string to text?
body: <p>Json value may consist of a string value. eg.:</p>
  
  <pre><code>postgres=# SELECT to_json('Some "text"'::TEXT);
       to_json
  -----------------
   "Some \"text\""
  </code></pre>
  
  <p>How can I extract that string as a postgres text value?</p>
  
  <p><code>::TEXT</code> doesn't work. It returns quoted json, not the original string:</p>
  
  <pre><code>postgres=# SELECT to_json('Some "text"'::TEXT)::TEXT;
       to_json
  -----------------
   "Some \"text\""
  </code></pre>
  
  <p>Thanks.</p>
  
  <p>P.S. I'm using PostgreSQL 9.3</p>