Guest User

Untitled

a guest
Dec 19th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. WITH jsondata AS (
  2. SELECT '{"house_color": "white", "dynamic_properties": [{ "visibility" : "blue" }, { "autonomy" : "self"}]}'::json as data
  3. )
  4. SELECT
  5. data ->> 'house_color'
  6. FROM jsondata, json_array_elements(data -> 'dynamic_properties') as elem
  7. WHERE elem ->> 'visibility' = 'blue'
Add Comment
Please, Sign In to add comment