I am comparing MongoDB with PostgreSQL query abilities. I struggle a bit with finding simple equivalent for the following MongoDB queries. What are the equivalent commands in PostgreSQL JSONB to MongoDB's:
Single Element Satisfies the Criteria
db.inventory.find( { memos: { $elemMatch: { memo: 'on time', by: 'shipping' } } } )
Combination of Elements Satisfies the Criteria
db.inventory.find( { 'memos.memo': 'on time', 'memos.by': 'shipping' } )
From: https://docs.mongodb.org/manual/tutorial/query-documents/#array-of-embedded-documents