I have a table: "events" with jsonb column "logs".
Having events record with following logs:
[
{state: "something", recorded_at: "some-timestamp"},
{state: "other", recorded_at: "some-other-timestamp"},
{nothing: "interesting", recorded_at: "timestamp"}
]
I would like to perform this query:
- select record with logs that have filtered out entries without "state" key
I don't really want to construct WHERE query conditions, I just want to filter out "logs" in returned result.
How to do it?