title: Query for element of array in JSON column
body: <p>Recently upgraded to using PostgreSQL 9.3.1 to leverage the JSONfunctionalities. In my table I have a json type column that has a structure like this:</p>
  
  <pre><code>{
     "id": "123",
     "name": "foo",
     "emails":[
        {
          "id": "123",
          "address": "somethinghere"
        },
        {
          "id": "456",
          "address": "soemthing"
        }
     ]
  } 
  </code></pre>
  
  <p>This is just dummy data for the purpose of the question.</p>
  
  <p>Is it possible to query for a specific item in the emails array based on the id?<br>
  Pretty much: "return email where id=123)"?</p>