jsonb LIKE query on nested objects in an array
问题 My JSON data looks like this: [{ "id": 1, "payload": { "location": "NY", "details": [{ "name": "cafe", "cuisine": "mexican" }, { "name": "foody", "cuisine": "italian" } ] } }, { "id": 2, "payload": { "location": "NY", "details": [{ "name": "mbar", "cuisine": "mexican" }, { "name": "fdy", "cuisine": "italian" } ] } }] given a text "foo" I want to return all the tuples that have this substring. But I cannot figure out how to write the query for the same. I followed this related answer but