title: Querying for a value out of a json field Postgres
body: <p>I have the following column in my database which is a postres jsonb object. I am just trying to fetch the value of additional_data from mytable which has the json string in it.</p>
  <pre><code>select additional_data from mytable;  
  </code></pre>
  <pre class="lang-json prettyprint-override"><code>{&quot;latitude&quot;:&quot;123&quot;, &quot;longitude&quot;:&quot;234&quot;}
  {&quot;latitude&quot;:&quot;567&quot;, &quot;longitude&quot;:&quot;890&quot;}
  </code></pre>
  <p>i'm just trying to get the value of latitude for my query and I am unable to figure out how the exact syntax would need to be for this. I tried to do the following</p>
  <pre><code>select latitude-&gt;&gt;'additional_data' from mytable;
  select latitude-&gt;'additional_data' from mytable;
  select latitude#&gt;&gt;'additional_data' from mytable;
  </code></pre>
  <p>but when I do this, I get the following error</p>
  <pre><code>SQL Error [42703]: ERROR: column &quot;latitude&quot; does not exist
  Position: 8
  </code></pre>
  <p>but that column definitely exists. Not sure what I am doing wrong.</p>