I have a jsonb column called props that looks like this:
{"house_color": "white", "dynamic_properties": [{ "visibility" : "blue" }, { "autonomy" : "self"}]}
Right now I know how to get the all the colors for all of my houses by doing:
select "props"->"house_color" as color
FROM houses
Now, I'm trying to get all the visibility dynamic properties by doing some type of condition in the SELECT, and I'm stuck. So, in the example I would just get 'blue'. I'm looking for something like
select "props"->"dynamic_properties"->"visibility" as color
FROM houses
But I don't know how to look in within objects in that dynamic_properties array.