title: SQL query to determine if a JSON value contains a specified attribute
body: <p>I have a table with a column for storing a JSON value for each row. Currently, these are not standardized. I'd like to end up with each of these JSON values being standardized in number and title of attributes. Is there a query I can use to determine whether or not each JSON value contains a specified attribute? </p>
  
  <p>As an example, here are what some of the JSON values look like:</p>
  
  <pre><code>{"name":"Item 1","cost":"4.99"}
  {"name":"Item 2"}
  {"name":"Item 3","cost":""}
  {"name":"Item 4"}
  </code></pre>
  
  <p>How do I:</p>
  
  <ul>
  <li>Determine which rows <em>have</em> a "cost" attribute (items 1 &amp; 3)</li>
  <li>Determine which rows do not have a "cost" attribute (items 2 &amp; 4)</li>
  <li>Determine which rows have a value set for the "cost" attribute (item 1)</li>
  </ul>
  
  <p>Thank you! This is my first time asking (at least recently) so any help is greatly appreciated! </p>