title: Postgres - escape double quotes inside escaped double quotes
body: <p>I have a table named <strong>summary</strong> which has two columns, <strong>id</strong> which is <strong>SERIAL</strong> and <strong>summary</strong> which is an <strong>array of json</strong> elements.</p>
  <p>To insert in this table, i have to follow this syntax:</p>
  <pre><code>insert into summary values (default, '{&quot;{\&quot;index\&quot;: -1, \&quot;nivel\&quot;: -1, `\&quot;title\&quot;: \&quot;hello world\&quot;`, \&quot;children\&quot;: []}&quot;}')
  </code></pre>
  <p>But if i want to escape double quotes inside title, for example:</p>
  <pre><code>insert into summary values (default, '{&quot;{\&quot;index\&quot;: -1, \&quot;nivel\&quot;: -1, \&quot;title\&quot;: \&quot;hello \&quot;world\&quot;\&quot;, \&quot;children\&quot;: []}&quot;}')
  </code></pre>
  <p>It returns this error:</p>
  <pre><code>ERROR:  invalid input syntax for type json
  LINE 1: insert into summary values (default, '{&quot;{\&quot;index\&quot;: -1, \&quot;ni...
                                               ^
  DETAIL:  Token &quot;world&quot; is invalid.
  CONTEXT:  JSON data, line 1: {&quot;index&quot;: -1, &quot;nivel&quot;: -1, &quot;title&quot;: &quot;hello &quot;world...
  </code></pre>
  <p>How can i escape that properly?</p>