title: Get value from JSON array in postgres
body: <p>I have a strange JSON array in my Postgres Database without curly brackets. It has the datatype Text so i need to cast it in a JSON i guess.</p>
  <p>It looks like this and can change from row to row.</p>
  <pre><code>    [
    [
      &quot;-&quot;,
      &quot;name&quot;,
      &quot;Gates&quot;
    ],
    [
      &quot;-&quot;,
      &quot;name_1&quot;,
      null
    ],
    [
      &quot;-&quot;,
      &quot;name_2&quot;,
      null
    ],
    [
      &quot;-&quot;,
      &quot;na_cd&quot;,
      null
    ],
    [
      &quot;-&quot;,
      &quot;class_cd&quot;,
      null
    ],
    [
      &quot;-&quot;,
      &quot;reference&quot;,
      &quot;190955&quot;
    ],
    [
      &quot;-&quot;,
      &quot;lang_cd&quot;,
      &quot;en&quot;
    ],
    [
      &quot;-&quot;,
      &quot;uid_nr&quot;,
      null
    ],
    [
      &quot;-&quot;,
      &quot;id&quot;,
      19000
    ],
    [
      &quot;-&quot;,
      &quot;firstname&quot;,
      &quot;Bill&quot;
    ],
    [
      &quot;-&quot;,
      &quot;spare&quot;,
      null
    ]
  ]
  </code></pre>
  <p>What i need is to find and print the ID if there is one. In this example 19000.</p>
  <p>Can someone please help how can do this?</p>