PostgreSQL (13.2)
I have a table with 2 columns - timestamp and snapshot. Snapshot consist a JSONB - dict that represent the condition of warehouse. The data stracture is like this
{
"key1": {...},
"key2": {...},
"key3": {...},
"key4": {...},
"key5": {...}
}
So I need to get the specific key in json that consist the data I am looking for. I also need to get a row timestamp that holds the snapshot. How can I query this?
ps. In python i can use smth like dict.keys and then start looping across all keys, something similiar i need here for searching the data.
pps. also It would be interesting to know how to implement it with SQLAlchemy
[screenshot from DB viewer]
