title: Check if field exists in json type column PostgreSQL
body: <p>How do you check if a <code>json</code> field in Postgres has a certain element?</p>
  
  <p>I have tried with <code>json-&gt;&gt;'attribute' is not null</code> and doesn't work.</p>