I have a table X with one column of type jsonb.
Jsonb contains json array - "cities":["aaaa","bbbb","cccc"].
Postgresql 9.4 provides jsonb operators to get json array elements using '->'
There is another table Y with column cities.
Y
a b cities
aaaa
bbbb
cccc
I want to display select Y.a, Y.b from Y, X only if X.jsonb->cities is present in Y.cities.