Created
February 5, 2015 09:44
-
-
Save dbryand/17cff141c431c47c0948 to your computer and use it in GitHub Desktop.
Postgres: Find by email in array of JSON objects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Inspiration: http://stackoverflow.com/a/19868697/1221591 | |
select | |
* | |
from | |
events, | |
json_array_elements(events.raw->'attendees') as attendees | |
where | |
attendees->>'email' = '[email protected]'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment